Let's do not consider what we can benefit from webclient ui framework( for example better achitecture, cleaner code, better Maintainability, consistent session magement, consistent navigation management etc ) for the moment. I would like to figure out what is the percent of performance loss caused by additional layers introduced in webclient UI framework - the BOL and Genil. So I made the following performance testings.
I have created one webclient UI component and one ABAP webdynpro component. Both have the exactly the same functionality:
In the webclient UI component, I ensure that the view controller only calls methods defined in BOL interface, like cl_crm_bol_core~query and modify, cl_crm_bol_entity~set_property and get_property, and if_bol_transaction_context~save. In ABAP webdynpro UI component, I directly call the lower layer function modules SOC_POST_SEARCH, SOC_POST_MODIFY and SOC_POST_SAVE in view controller method.
The ABAP webdynpro search page looks like below:
o(x): Additional Layer overhead of a given BOL model x
f(x): absolute execution time spent in BOL and GenIL layer
a(x): absolute execution time of application API
I have written the following report to perform Social post search via cl_crm_bol_core~query. Then I can get the exact time spent on a(x)|x=CRMSM and calculate the o(x)|x=CRMSM.
REPORT ZSAT_POST_SEARCH.
PARAMETERS: po_id type socialdata-internal_id,
maxhit type i.
DATA: lo_core TYPE REF TO cl_crm_bol_core,
lo_collection TYPE REF TO if_bol_entity_col,
lo_root_entity TYPE REF TO cl_crm_bol_entity,
lv_view_name TYPE crmt_view_name,
lv_query_name TYPE crmt_ext_obj_name VALUE 'PostSearch',
lt_query_parameter TYPE crmt_name_value_pair_tab.
START-OF-SELECTION.
SHIFT po_id RIGHT DELETING TRAILING space.
IF po_id NE space.
DATA(ls_query_parameter) = VALUE crmt_name_value_pair( name = 'INTERNAL_ID' value = po_id ).
APPEND ls_query_parameter TO lt_query_parameter.
ENDIF.
IF maxhit EQ space.
maxhit = 100.
ENDIF.
ls_query_parameter = VALUE #( name = 'MAX_ROWS' value = maxhit ).
APPEND ls_query_parameter TO lt_query_parameter.
lo_core = cl_crm_bol_core=>get_instance( ).
lo_core->load_component_set( 'CRMSMT' ).
lo_collection = lo_core->query(
iv_query_name = lv_query_name
it_query_params = lt_query_parameter
iv_view_name = lv_view_name ).
DATA(lv_size) = lo_collection->IF_BOL_BO_COL~SIZE( ).
WRITE:/ 'Number of ' , lv_size, ' Posts has been found!'.
Here is the result for Social post search:
Total execution time of post search: 934 milliseconds
Overhead in Additional Layer: 218( spent on component set loading) + ( 634 – 234 – 289 ) = 329 ( 35% in total time ).
Considering that the component set load will only be performed once in the application lifetime, and it would be further improved by using share memory to store model metadata, so I do not regard the time spent on component set loading as overhead. As a result, the final overhead is 329 - 218 = 111 milliseconds, that is 12% of total time.
Note: 97 milliseconds spent on program SAPMSSY4 should be deducted since it contains the execution of routines registered on COMMIT, such as middleware logic, the workflow event, update function module etc. Those are nothing to do with BOL & Genil framework processing.
Total time in Save & Commit: 6202 + 354 = 6556
Overhead in Additional Layer: (6202 – 6199) + ( 354 – 24 – 175 ) = 158 ( 2.4% )
The testing result about overhead percent for the three Genil Model could be found in below graph:
According to the formula, the more complex the application API is, the less performance loss caused by additional layer overhead in Web client UI. Also in reality, the performance bottleneck resides in application API, not in the call stack of BOL & GenIL delegation. So in my opinion, performance reason should NEVER be used as the excuse when you do not use Webclient UI as the first choice for custom development in CRM.
Taken these benefits into consideration, in my opinion, the gain outweighs the minor performance overhead in additional BOL & Genil layer, if we always stick to Webclient UI in CRM custom development.
Thanks a lot for your reading so far. You may also be interested with this blog as well: BOL or Function Modules - Which API to use in CRM Development? from christian.drumm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |