Core Web Vitals × growth · Senior Software Engineer, Apna.co
Homepage Performance Overhaul
I led the performance revamp of Apna's highest-traffic page. The JS bundle went from 18 MB to 6 MB and load time from 2.12 s to 0.76 s — and Core Web Vitals scores rose 18%.
- faster load · 2.12 s → 0.76 s
- 3×faster load · 2.12 s → 0.76 s
- largest contentful paint
- −700 mslargest contentful paint
- less layout shift
- 7×less layout shift
- JavaScript bundle
- 18 → 6 MBJavaScript bundle
Homepage load · replay
18 MB JavaScript · 7× layout shift
6 MB JavaScript · 1× layout shift
Tick marks = 1 MB of JavaScript each (uncompressed).
Load time went from 2.12 seconds to 0.76 seconds; JavaScript bundle from 18 MB to 6 MB; layout shift reduced 7 times.
01 · Problem
What was wrong
The homepage is the front door for millions of job seekers, many on patchy mobile networks — and it opened slowly. 2.12 s to load, an 18 MB JavaScript bundle, and a layout that jumped as content arrived.
02 · Ownership
What I owned
- Owned the revamp end to end: audit, plan, and implementation.
- Cut the JavaScript bundle from 18 MB to 6 MB.
- Reworked the rendering strategy for above-the-fold content.
- Set up Sentry performance monitoring so regressions show up on their own.
03 · Decisions
Choices and why
Decision 1
Shrink the bundle first, tune rendering second
Changing both at once hides which change helped. With the payload down, the rendering changes could be measured on their own.
Decision 2
Reserve space instead of adding loaders
Layout shift comes from content arriving without a home. Reserving that space fixes it without adding more UI.
Decision 3
Monitor in production, not only in the lab
Lighthouse runs on a fast laptop. Sentry performance data reflects the devices and networks users actually have.
04 · Evidence
Measurements
| Load time | 2.12 s → 0.76 s |
|---|---|
| Largest contentful paint | 700 ms faster |
| Cumulative layout shift | 7× lower |
| JavaScript bundle | 18 MB → 6 MB |
| Core Web Vitals scores | +18% |
05 · Results
What changed
- The homepage loads about 3× faster.
- Core Web Vitals scores up 18%, improving SEO and conversion.
- Sentry monitoring turned performance from a one-off project into an ongoing check.
- React
- Next.js
- TypeScript
- Webpack
- Sentry
- Core Web Vitals