cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce the application initial load from the launchpad?

Jayakrishnan
Active Participant

Hi All,

I am working on Custom SAPUI5 application which involves sap.ui.vbm map control and smart tables and normal sap.ui.table. I have a below issues when i load my application very first time from the launchpad.

1. It takes more time to load. when i click the tile in the Launchpad, it opens the page,then took some time then it loads another controls such as vbm maps.

2. When i check in the network tab, i see most of the js files related to vbm and cord-ova getting loaded and my services also called many times as a "$batch" calls.

How to handle this effectively and avoid unnecessary load time in the beginning.

Thank you,

Regards,

JK.

Accepted Solutions (1)

Accepted Solutions (1)

boghyon
Product and Topic Expert
Product and Topic Expert

Try to identify which libraries are all loaded in the network tab (when launching the app) and assign them to sap.ui5/dependencies/libs in the app descriptor accordingly. Usually, GeoMap, Grid Tables, and "smart" controls require the following libs as mentioned in this post:

  • "sap.ui.core": {},
  • "sap.m": {},
  • "sap.ui.vbm": {},
  • "sap.ui.comp": {}, // for "smart" controls
  • "sap.ui.table": {},
  • "sap.ui.unified": {} // transitively required by sap.ui.table controls. Still include it to load it in parallel with other libs
  • and possibly more..

Additionally, in order to fetch $metadata as early as possible, enable preload in sap.ui5/models/<myODataModelName>:

  • "preload": true

Try also to reduce the number of sync XHRs as much as possible when loading the app. To identify such requests, start the app (form index.html. Not from FLP) with data-sap-ui-xx-nosync="warn", and see the reports in the browser console.

For further optimizations, follow the applicable guidelines mentioned in Performance: Speed Up Your App.

Jayakrishnan
Active Participant
0 Kudos

Thanks boghyon.hoffmann . I will include and try.

Jayakrishnan
Active Participant
0 Kudos

Hi boghyon.hoffmann , as you recommended i added the line in my index.html and checked the console. i got the following error messages regarding vbm control. i included that library in the descriptor too. but still it is coming. how to avoid that?

Thank you,

JK.

boghyon
Product and Topic Expert
Product and Topic Expert

Hi jayakrishnan.chnadramohan,

I see that sap.ui.vk.MapContainer is also requested. And possibly also sap.ui.vk.ListPanelStack?

In that case, the libraries "sap.ui.vk" and "sap.ui.layout" (ListPanelStack requires it) need to be added to manifest as well. Just make sure that all libraries, that are in use, are included in there.

About the console reports: what you want to avoid is the error messages "loading resource '...' with sync XHR" <-- those requests are blocking the main/UI thread of the browser during the round trip which should be reduced as much as possible.* All other reports about retrieving objects via global name can be ignored.

____
* Some resources are just loaded synchronously by the controls which we cannot control (e.g. controls requesting messagebundle). Also all fragments are currently still fetched with sync XHR (GitHub issue). But at least the fragments should be included in the Component-preload.js after building the app, so that the deployed app doesn't send sync XHRs for fragments anymore.

Jayakrishnan
Active Participant

Thanks boghyon.hoffmann for the reply and useful suggestions. Yes i need to add the sap.ui.vk also along with the additional required libraries. I can see the the performance better than before. Thank you.

Regards,

JK.

Answers (0)