Skip to content

Warmup most common entrypoints in Vite

What does this MR do and why?

This change speeds up the requests for most common entrypoints at GitLab: main.js and super_sidebar.js. This should give a boosted performance on a cold start of GDK.

JS file Before After
javascripts/main.js ~170ms ~35ms

How to set up and validate locally

  1. Disable Caching in DevTools.
  2. Do a cold start of Vite. gdk stop vite && rm -rf node_modules/.vite && gdk start vite
  3. Open any page.
  4. Measure the time to get javascripts/main.js (not javascripts/entrypoints/main.js!)
  5. Repeat this without the change.
  6. Compare numbers.

Merge request reports