Rule Definition
As OpenUI5 is evolving, the loading processes in the background were significantly improved. To get the best out of these changes in the core and to speed up your app, we recommend that you switch on asynchronous loading. With asynchronous loading, files are retrieved in parallel. This is much quicker than with synchronous loading, where files are retrieved sequentially
Remediation
Update the application setting to activate the asynchronous loading. See Remediation Samples
Violation Code Sample
1.1- The Setting bootstrapping tag "data-sap-ui-async" in index.html file is not to true
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My App</title>
<script
id="sap-ui-bootstrap"
...
data-sap-ui-async="false">
</script>
</head>
</html>
_________________________________________________________
1.2- The Setting bootstrapping tag "data-sap-ui-preload" in index.html file is not to async
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My App</title>
<script
id="sap-ui-bootstrap"
...
data-sap-ui-preload="">
</script>
</head>
</html>
_________________________________________________________
2- The setting of the "async" property in the metadata of the manifest.json file is not 'true'.
"sap.ui5": {
"rootView": {
"viewName": "sap.ui.demo.worklist.view.App",
"type": "XML",
"async": false,
"id": "app"
},
}
Fixed Code Sample
1.1- Setting bootstrapping tag data-sap-ui-async="true" in index.html file.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My App</title>
<script
id="sap-ui-bootstrap"
...
data-sap-ui-preload="async">
</script>
</head>
</html>
__________________________
1.2- Setting bootstrapping tag data-sap-ui-async="true" in index.html file.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My App</title>
<script
id="sap-ui-bootstrap"
...
data-sap-ui-async="true">
</script>
</head>
</html>
__________________________
2- Setting the async property in the metadata of the manifest.json file to true.
"sap.ui5": {
"rootView": {
"viewName": "sap.ui.demo.worklist.view.App",
"type": "XML",
"async": true,
"id": "app"
},
Reference
https://sapui5.hana.ondemand.com/sdk/#/topic/676b636446c94eada183b1218a824717
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.