Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization suggestions #617

Closed
974758241 opened this issue Apr 30, 2022 · 5 comments
Closed

Optimization suggestions #617

974758241 opened this issue Apr 30, 2022 · 5 comments
Labels
enhancement New feature or request information required Further information is required stale Issue is stale

Comments

@974758241
Copy link

  1. You can progress to compressed files such as sap.ui.core.js
  2. The user can specify the language to be packaged
  3. If I want to contribute, how can I do it?
@974758241 974758241 added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Apr 30, 2022
@RandomByte
Copy link
Member

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

@RandomByte RandomByte added enhancement New feature or request and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels May 2, 2022
@flovogt flovogt added the information required Further information is required label Feb 21, 2023
@flovogt
Copy link
Member

flovogt commented Feb 21, 2023

Could you please share some more details about your thoughts on 1. and 2.?

@974758241
Copy link
Author

974758241 commented Feb 22, 2023

  1. 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'.
  2. 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.
  3. 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

@RandomByte
Copy link
Member

  1. 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?

  1. 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.

  1. 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 #731

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale Issue is stale label Jun 13, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request information required Further information is required stale Issue is stale
Projects
None yet
Development

No branches or pull requests

3 participants