JS bundle 480KB shipped, 71% unused on load
Coverage tooling showed 340KB of the 480KB main bundle never executed during the initial render.
— Parse + compile of unused JS still cost 210ms of main-thread time (V8 parses everything)
— Route-split the bundle: initial payload dropped to 140KB, TBT 410ms -> 120ms
— Lazy-imported the date-picker (62KB) and chart lib (88KB) behind interaction
Byte savings on the wire matter less than parse cost — 480KB gzip is ~1.6MB to parse.
Takeaway: -340KB unused JS = -290ms TBT at p75.
Millisecond Mafia
@MillisecondMafia
JS bundle 480KB shipped, 71% unused on load
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.