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

CCDM: v15 webpack build is slower than v14 #331

Open
manolo opened this issue Feb 14, 2020 · 4 comments
Open

CCDM: v15 webpack build is slower than v14 #331

manolo opened this issue Feb 14, 2020 · 4 comments
Assignees

Comments

@manolo
Copy link
Member

manolo commented Feb 14, 2020

See StartupPerformanceIT.devModeInitializerToWebpackUpIsBelow5500ms , the threshold should be set to 5500 but in v15 it needs to be 9500 to pass

Considerations:

  • The project for measuring performance produces a mostly empty entry point target/frontend/generated-flow-imports.js only importing the @vaadin/flow-frontend/dndConnector-es6.js, in consecuence webpack in does not visit, bundle and optimize complex dependencies
  • in v15 the entrypoint is frontend/index.ts which includes Router, Flow and Connect having to optimize a big amount of code. In a fast system it takes about 3000ms extra.
  • in addition, v15 webpack also visits BootstrapHandler.js and client-nnnnn.cache.js files in order to include them in the bundle.

Probably this increment of the build time is assumable, because browser does not need extra requests for getting the client-cache code.

@manolo manolo added hilla Issues related to Hilla performance labels Feb 14, 2020
@haijian-vaadin
Copy link
Contributor

Haijian will talk to the Flow team to see if we can close the ticket.

@haijian-vaadin haijian-vaadin self-assigned this Feb 18, 2020
@manolo
Copy link
Member Author

manolo commented Mar 5, 2020

Since the test actually does not check real project stuff, we need to verify whether the design of the bootstrap process in v15 is good.
In order to test performance issues, we need to compare a real project (e.g. bakery) with multiple dependencies run in both modes and check the following:

  • start time when typing spring-boot:run
  • time taken by webpack when rebuilding in dev-mode (modify some source)
  • size of bytes downloaded, and number of request the first time the app is visited (dev and prod)
  • size and requests the second time the app is visited without resetting cache (dev and prod)

Update: we have done some time and size measurements: https://docs.google.com/spreadsheets/d/12dl-QLUzgMOtUYVjun9XRB1X1DqUqKVgPpFSbA4I2yQ/edit#gid=0

@manolo
Copy link
Member Author

manolo commented Mar 5, 2020

Unmute StartupPerformanceIT.devModeInitializerToWebpackUpIsBelow5500ms at https://teamcity.vaadin.com/viewType.html?buildTypeId=Flow_FlowTests&branch_Flow=7737&tab=buildTypeStatusDiv when done

@pleku
Copy link
Contributor

pleku commented Sep 3, 2020

Apparently one reason why 15+ is slower than 14 is the progress-webpack-plugin. When comparing the webpack execution times without it, there is a significant improvement so we're removing it for that (and for the fact that it doesn't work for majority of the users) vaadin/flow#8933.

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

No branches or pull requests

3 participants