Search code examples
sapui5

speed up initialisation of object page


We are developing a worklist application for Purchase orders. Upon clicking an entry in the table, the user will be navigated to the object view. The issue here is that when the application loads the first time, the resources haven't been loaded yet. The object page contains a fair amount of controls and the first time a user opens the page, it takes a very long time (5-6sec). After that, performance is okay.

Any idea on how to improve performance the first time or how to load the object page (or controls) beforehand?

Worklist view

Worklist


Solution

  • Pre-loading your libraries in the application's <head> improves startUp performance, using data-sap-ui-libs

    <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>Page</title>
      <script src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' 
      data-sap-ui-libs='sap.m, sap.ui.layout,...' 
      data-sap-ui-preload="async">
      </script>
    </head>