ui5-tooling
ui5-tooling copied to clipboard
Optimization suggestions
- You can progress to compressed files such as sap.ui.core.js
- The user can specify the language to be packaged
- If I want to contribute, how can I do it?
Could you please share some more details on your proposed optimization? I.e. what is the problem you want to solve? And how do you want to solve it, in more detail?
You can find our contributing guideline here: https://github.com/SAP/ui5-tooling/blob/master/CONTRIBUTING.md#-contributing-code
Could you please share some more details about your thoughts on 1. and 2.?
- There are many things that can be done about sap.ui.core.js. For example, a large number of text comments and line breaks can be removed, which can be packaged in webpack5. Developers can choose whether or not to remove comments when packaging, which will reduce the size of the code, especially when a large number of programs are deployed to FLP. This performance improvement is huge, of course, there is a lot of room for improvement in sap.ui.core.js, especially 'Free UI5 Develop'.
- With regard to translation files, most users will not require all languages, but only one to two. When we package, we can delete other translation files (messagebundle*.properties) according to the language specified by the user.
- After the user has packaged, many files can be deleted, such as "sap.m.AppRenderer.js", leaving only the library-preload.js related to the library used by the user, so that the overall code size will be much smaller after packaging, which is helpful for developers to carry out rapid CI/CD.
Edit RandomByte: Layout changes for readability
- There are many things that can be done about sap.ui.core.js. For example, a large number of text comments and line breaks can be removed, which can be packaged in webpack5. Developers can choose whether or not to remove comments when packaging, which will reduce the size of the code, especially when a large number of programs are deployed to FLP. This performance improvement is huge, of course, there is a lot of room for improvement in sap.ui.core.js, especially 'Free UI5 Develop'.
Comments are generally removed when bundling, with only few exceptions such as copyright statements being preserved for legal reasons. See for example: https://ui5.sap.com/resources/sap-ui-core.js
You should be able to see the same behavior when checking the Component-preload.js or library-preload.js files in the build result of your projects.
Can you share more details where you see a large size of comments in bundles created by UI5 Tooling?
- With regard to translation files, most users will not require all languages, but only one to two. When we package, we can delete other translation files (messagebundle*.properties) according to the language specified by the user.
This might be a reasonable enhancement in the future. It could be possible to filter localization files based on a configured set of languages. But this needs further clarification. We should check whether this can be solved in a custom task first.
- After the user has packaged, many files can be deleted, such as "sap.m.AppRenderer.js", leaving only the library-preload.js related to the library used by the user, so that the overall code size will be much smaller after packaging, which is helpful for developers to carry out rapid CI/CD.
This might be the same requirement as discussed in https://github.com/SAP/ui5-tooling/issues/731
This issue has been automatically marked as stale because it has been open for 60 days with no activity. It will be closed in 10 days if no further activity occurs.