integreat-app icon indicating copy to clipboard operation
integreat-app copied to clipboard

2499: Proposals to improve js execution time

Open sarahsporck opened this issue 11 months ago • 1 comments

Short description

Proposal to reduce js execution time and minimize main thread work. Feel free to use this pr as inspiration/starting point for #2499 and #2498. Also feel free to close this PR if you don't see the changes working

Proposed changes

  • set sideEffects: false in package.json to allow tree shaking our packages
  • use splitChunks plugin to split the code into react, dompurify (as it is quite big and cannot be tree-shaken), node_modules & our code. This can probably be optimized further
  • get rid of lodash in production code (check out the bundle analyzer)

Related issues

Relates: #2498 #2499


sarahsporck avatar Feb 28 '24 11:02 sarahsporck

Looks nice :) Bundle sizes are super small! There is a lot improvement! Lighthouse doesn't show me much performance improvements tbh, so. The largest contentful paint is still at ~8s but a little bit faster than on main

f1sh1918 avatar Feb 29 '24 20:02 f1sh1918

I opened #2776 without the webpack changes and a few further code optimizations and cleanup. I'll have a look at our webpack config and code splitting/chunking later.

steffenkleinle avatar May 02 '24 15:05 steffenkleinle

Won't do, closing.

steffenkleinle avatar May 26 '24 12:05 steffenkleinle