Skip to content

Commit

Permalink
OpenUI5 Documentation Update 24.05.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
openui5bot committed May 24, 2024
1 parent bddb553 commit 1b07d42
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/Performance_Speed_Up_Your_App_408b40e.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Please use the `manifest.json` application descriptor file to declare dependenci

Make sure that you don't load too many dependencies. In most apps it's enough to load the libraries `sap.ui.core` and `sap.m` by default, and add additional libraries only when needed.

If you want to make additional libraries known in your app, without directly loading them during the app start, you can add them to the dependency declaration in the `manifest.json` file with the `lazy` loading option. This makes sure that the libraries are only loaded when they're needed:
If you want to make additional libraries known in your app, without directly loading them during the app start, you can add them to the dependency declaration in the `manifest.json` file with the `lazy` loading option:

```json
"sap.ui5": {
Expand All @@ -61,16 +61,12 @@ If you want to make additional libraries known in your app, without directly loa
...
```

If a library preload contains reuse components and this preload is configured to be loaded lazily \(via `"lazy": true` in the dependencies of the `manifest.json`\), the library isn't available upon creation of the related component.

In the above case you need to use `sap/ui/core/Lib.load({name: "my.heavy.charting"})` before creating the component \(e.g with `Component.create({ name: "my.component" })` or component usage `myComponent.createComponent("myUsage")`\).

An indicator that a component is inside a library is the existence of an entry `sap.app/embeddedBy` in its `manifest.json` file.
If a library preload is configured to be loaded lazily \(`"lazy": true`\), the library isn't available upon creation of the related component. In this case, you need to ensure yourself that the library is preloaded, e.g. via `sap/ui/core/Lib.load({name: "my.heavy.charting"})`, before any module from that library is used.

**Additional Information:**

- [Descriptor for Applications, Components, and Libraries \(manifest.json\)](Descriptor_for_Applications_Components_and_Libraries_manifest_json_be0cf40.md)
- `API Reference:` [`sap/ui/core/Lib.load()`](https://sdk.openui5.org/api/sap.ui.core.Lib%23methods/sap.ui.core.Lib.load)
- API Reference: [`sap/ui/core/Lib.load()`](https://sdk.openui5.org/api/sap.ui.core.Lib%23methods/sap.ui.core.Lib.load)

***

Expand Down

0 comments on commit 1b07d42

Please sign in to comment.