Analyze webpack compilation stats for performance insights
We save our webpack compile stats for every CI pipeline's
gitlab:assets:compile job within a
stats.json file. This file contains all the information we need to identify key metrics that we can use to improve the performance of GitLab, including:
- Average/median/mean entry point sizes (lower is better)
- Max entry point size. List of the largest and most problematic ones.
- Average number of chunks per module (lower is better, ideal is 1 chunk per module)
- Max number of chunks per a single module. List modules that appear in multiple chunks, sorted by size
- Total webpack build time and max heap size.
- Create means to calculate the metrics above from our
- Prescribe goals to improve each of these metrics over time, and document "ideal" values within our frontend guidelines.