hilla icon indicating copy to clipboard operation
hilla copied to clipboard

CCDM: v15 webpack build is slower than v14

Open manolo opened this issue 5 years ago • 4 comments

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 avatar Feb 14 '20 13:02 manolo

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

haijian-vaadin avatar Feb 18 '20 13:02 haijian-vaadin

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 avatar Mar 05 '20 18:03 manolo

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

manolo avatar Mar 05 '20 18:03 manolo

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.

pleku avatar Sep 03 '20 06:09 pleku