on 2020 May 12 8:23 AM
Hi experts!
During researching of the SAP UI5 bootstrap process, there are two parameters for asynchronous loading process:
data-sap-ui-async=true / false
data-sap-ui-preload="auto / async / sync"
So, data-sap-ui-preload="async" parameter as I understood, can activate async preload only for libraries which declared in
data-sap-ui-libs="sap.m,sap.tnt,....."
And it's OK. In DevTools I see this async preload. ui5loader-dbg uses it's async function "loadJSResourceAsync".
If I set data-sap-ui-async=true parameter, this parameter does the same as data-sap-ui-preload="async" parameter for bootstrap libs, but it works for other modules as well.
So, my bootstrap uses data-sap-ui-async=true parameter.
I expected that libriaries from manifest-file of my Component should loading asynchronously but no..
manifest.json has, for example, four libs which I want to preload, but in DevTools I see Sync loading..
...
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.30.00",
"libs": {
"sap.tnt": {},
"sap.gantt": {},
"sap.fileviewer": {},
"sap.ndc": {}
}
}
Look at this picture
And the ui5loader-dbg uses it sync function as well: requireSync.
What am I missing?
Best regards, Evgeny T.
I could load libraries of Component asynchronously only so:
I added in ComponentContainer constructor parameter manifest: "./manifest.json"
<script type="text/javascript">
function compLoad() {
new sap.ui.core.ComponentContainer({
name: "InitTest",
settings : {
id : "initTestBlabla"
},
manifest: "./manifest.json"
}).placeAt("content");
}
</script>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-onInit="compLoad"
data-sap-ui-libs="sap.m,sap.tnt"
data-sap-ui-async=true>
</script>
As a result, manifest.json of the Component was loaded before Component.js and all of libriaries from manifest.json was loaded asynchroniously:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.