Performance
abap2UI5 is fast. Almost all processing runs on the ABAP backend, which is much faster than the browser.
abap2UI5 keeps frontend logic minimal: no business logic runs in the browser. Everything goes straight to the UI5 framework, which focuses only on UI rendering.
We've tested abap2UI5 with tables holding large numbers of entries and columns, so you can build your app with confidence — performance shouldn't be a concern.
view_display vs. view_model_update
The biggest optimization is choosing the right update method:
client->view_display( )— sends a new XML view and model to the frontend. UI5 destroys the current view and creates a new one from scratch. Use this only on initialization or when the view structure changes.client->view_model_update( )— sends only updated model data. UI5 refreshes the existing view via data binding, re-rendering only the changed controls. This keeps UI state (scroll position, focus, etc.) and is much faster.
abap
METHOD z2ui5_if_app~main.
CASE abap_true.
WHEN client->check_on_init( ).
DATA(view) = z2ui5_cl_xml_view=>factory(
)->page( `My App`
)->text( client->_bind( mv_text )
)->button( text = `update` press = client->_event( `UPDATE` ) ).
client->view_display( view->stringify( ) ).
WHEN client->check_on_event( `UPDATE` ).
mv_text = `new value`.
client->view_model_update( ).
ENDCASE.
ENDMETHOD.Suggestions
Want to tune your app further? A few tips:
- Call
client->view_displayonly when needed. Preferclient->view_model_updateso the UI5 framework only re-renders controls that have changed. - Prefer
client->_bind; useclient->_bind_editonly when users need to make changes the backend processes. Otherwise, you'll cause needless data transfers. - Declare public attributes in your app class only for variables shown on the frontend. This keeps the framework from reading unused values.
- Follow standard ABAP best practices, like cutting loops and choosing sorted tables, just like in any other ABAP project.
Performance Issues?
If you hit performance issues, build a sample and submit a pull request to the samples repository. We're glad to analyze it and see whether abap2UI5 can be made even faster.
