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

ui.frontend clientlib generation potential performance optimization #1042

Open
ahumphreys87 opened this issue Feb 8, 2023 · 0 comments
Open

Comments

@ahumphreys87
Copy link

Expected Behaviour

The webpack build outputs 3 chunks: runtime, vendor, main. These 3 files should be loaded onto pages seperately in order to leverage browser caching in the most optimal manner.

Actual Behaviour

The clientlibs generator will create a single clientlib (clientlib-react) containing all 3 of these files. Bundling them together and creating its hash based on the content of all 3.

These means that whenever we make a change the "main" bundle, the hash of the clientlib changes causing browser cache to be busted.

If we had 3 clientlibs, each bundle would have its own independent cache and hash value.

Screenshot 2023-02-08 at 15 24 42

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Build the sample produced by the archetype using a react frontend
  2. Observe the js.txt definition of clientlibs-react

Platform and Version

All

Sample Code that illustrates the problem

Logs taken while reproducing problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant