Skip to content
Web Performance

Two and a Half Seconds Spent on Charts Nobody Had Scrolled To

One post on this site failed its performance gate while another passed it, on the same route and the same bundle. The difference was four charts against two, hydrating whether or not a reader ever reached them. An A/B measurement with a control page, and the one metric it could not honestly claim.

Published · How this was researched

← Back to Global Tech Search

Market Horizon

Point-in-time measurement, Aug 28 2026 — one laptop, one commit, four alternating blocks

Target Sector

Web Performance, Front-End Engineering, Core Web Vitals, Data Visualisation

Blocking time, four-chart post

2498 → 114 ms

Charts at load vs. near the viewport

Two-chart control post

512 → 213 ms

Half the charts, roughly half the benefit

LCP

Not established

The arms drifted further than they differed

Two posts on this site render the same way. The network was never the problem draws four charts; how far is Kathmandu from the cloud draws two. Same route, same bundle, same layout, same prose components. One of them was failing the Lighthouse performance gate that runs on every push. The other was passing it.

Largest contentful paint was effectively identical on both. Layout shift was zero on both. The only metric between them was total blocking time — the time the main thread spends in long tasks where it cannot answer a click. So the suspicion was easy to state and annoying to prove: the charts were hydrating whether or not the reader ever scrolled to them, and a page with twice as many was paying twice.

Why the second post is the entire experiment

A before-and-after on one page cannot tell you what you just measured. Any change that makes the whole site lighter improves that page, and so does turning off something unrelated, and so does the laptop cooling down between runs.

The two-chart post fixes that, because the two hypotheses make different predictions about it:

  • The charts are the cost. Then the four-chart page improves substantially more than the two-chart page, because it has more of the thing being removed.
  • Something else got faster. Then both pages improve about the same, because they share everything else.

Everything below is arranged to let those two disagree.

Measuring the gate, not a proxy for it

Two arms, built from one commit, differing only in which ResponsiveContainer the charts import:

armbehaviour
Acharts mount at page load — Recharts' own container
Bcharts mount when their box comes near the viewport

Measured with Lighthouse, desktop preset, five reps per URL, because that is the instrument the gate itself uses. A bespoke Playwright probe would have produced tidier numbers about something nobody was failing.

CPU throttling at 4x is not decoration either. This laptop is roughly six times faster than the CI runner the gate actually runs on, and an unthrottled local run can show the direction of an effect while badly understating its size.

What it found

Blocking Time, Charts at Load vs. Deferred

Lighthouse desktop, 4x CPU throttle, median of block medians — MacBook Air M1, Aug 28 2026

The four-chart page fell from 2,498 ms of blocking time to 114 ms, a 95% cut. Main-thread work fell 78% and script bootup 84%. The Lighthouse performance score went from 0.69 to 0.98, which is the difference between failing that gate and not thinking about it again.

And the control held. The two-chart page fell 58%, against the four-chart page's 95%. The page with twice the charts got roughly twice the benefit, which is what "the charts were the cost" predicts and what "the build got faster" does not.

What it did not find

The interesting part of a measurement is usually the row you wanted to claim and cannot.

Which Differences Clear Their Own Noise

Between-arm gap against the largest distance a single arm travelled between blocks — four-chart page

Blocking time, main-thread work and script bootup each clear their drift by a wide margin. Largest contentful paint does not. Its between-arm gap is 310 ms and its worst within-arm drift is 439 ms, so the arms wandered further from themselves than they differed from each other.

The summary table will happily print LCP 643 ms → 333 ms, −48% for that page, and it is meaningless. On the control page the same calculation produces +48%, in the opposite direction, from a single anomalous block. Two numbers of equal size pointing opposite ways is what noise looks like when you insist on formatting it as a result.

Deferring the charts did not improve the largest contentful paint. It may have; this run cannot tell, and a percentage printed to no confidence at all is worse than no percentage.

The control page is also weaker than its headline. Its blocking-time gap is 299 ms against 233 ms of its own drift — it clears the bar, but not comfortably — and its main-thread and bootup figures do not clear it at all. The strong claim here belongs to the chart-heavy page.

How Far Each Arm Travelled From Itself

Same arm, same commit, two blocks an afternoon apart — the reason the blocks alternate

Arm A moved 799 ms between its own two blocks on the four-chart page. A single A-then-B pass, run in that order once, would have measured that drift and the code change together and had no way to tell them apart. This run is also noticeably noisier than an earlier pass on battery power, where the same arm drifted 3 ms; it was run on AC with the battery at 21% and charging, which is a thermally busier machine. The effect survived that. A smaller one would not have.

Nothing is hidden from a crawler

This is the objection the change deserves, and on a site with an AdSense low-value-content history it is not a hypothetical one. If a chart only exists after a reader scrolls, does the page still contain it for something that does not scroll?

The honest answer required capturing what the server actually sends. Both arms' post HTML was fetched over plain HTTP with JavaScript never executed:

## local-vs-cloud-crossover-2026        arm A      arm B
recharts-surface elements:                  0          0
recharts-wrapper elements:                  0          0
served bytes (scripts stripped):       44,768     44,384

Zero rendered charts in either arm. Recharts' container sizes itself from a measured parent, so it has never server-rendered a chart on this site — before this change or after it. The chart titles, subtitles and the prose around them are ordinary server-rendered markup from the surrounding card, and they are untouched.

The entire difference between the two served documents is Recharts' own empty measuring wrappers — four on the four-chart page, two on the two-chart page, matching the chart counts exactly and containing no content:

<div class="recharts-responsive-container" style="width:100%;height:330px">
  <div style="width:0;overflow-x:visible"></div>
</div>

384 bytes of empty div, on a page where the charts were never in the HTML to begin with. The deferral changes when work happens, not what is served.

What this does not say

It does not say deferring charts is free. It moves the cost to scroll time, where it is cheaper because it is spread out and much of it is never paid — but a reader who scrolls straight to the bottom pays all of it, and this run did not measure that reader.

It does not say anything about real visitors. Lighthouse under 4x throttling is a lab, chosen because it is the lab the gate uses; field data from actual readers is a different measurement that this site does not yet have.

And it says nothing about the failure mode the change introduces. If the observer never fires, the prose still renders and the page scores better, because a chart that never mounts is the fastest chart there is. No performance number would ever flag it — which is why the check for it is three end-to-end tests that scroll the page like a reader and assert a chart with real geometry in it, not a metric.

The number I set out to get was 2,498 → 114. The number that took the longest to be sure of was the one I had to throw away.

Sources

  1. chart-mount A/B run logs — four alternating blocks, 4x CPU throttle — This repository, 2026-08-28data/chart-mount/*-cpu4-block*.json — every figure in this post is computed from these files by scripts/bench/analyse-chart-mount.mjs.
  2. Deferring chart mount — method, control design, and what it failed to establish — This repositorydata/chart-mount/README.md, including the earlier unfinished battery-power pass in battery/ and why this run is the noisier of the two.
  3. Served HTML per arm, scripts stripped — This repository, 2026-08-28data/chart-mount/html-A.txt and html-B.txt, captured by scripts/bench/chart-mount-html.mjs — the basis for the claim that nothing is hidden from a crawler.
  4. Total Blocking Time — Chrome for DevelopersThe definition the gate scores against: time past 50 ms in every long task between first contentful paint and time to interactive.
  5. Intersection Observer API — MDN Web DocsThe mechanism the deferral is built on, and the rootMargin option that decides how early a chart mounts.
  6. Recharts — ResponsiveContainer source — RechartsWhy no chart on this site has ever server-rendered: the container sizes itself from a measured parent, which does not exist until the browser has laid the page out. Cited to source rather than to the docs site, whose deep links 404.

✓ Advantages

  • • The second page is a genuine control — same route, same bundle, same layout, half the charts — so the result distinguishes 'the charts were the cost' from 'the build got faster', which a single-page before/after cannot
  • • Every metric is reported against the distance its own arm travelled between blocks, so a difference smaller than the noise is printed as inconclusive rather than as a smaller win
  • • The served HTML was captured per arm with JavaScript never executed, which settles the question the change actually raises: whether deferring a chart hides anything from a crawler

× Challenges

  • • One laptop, one afternoon, on AC power at 21% battery — a thermally busier machine than the earlier pass, and the arms drifted 799 ms against 3 ms there
  • • The strong claim is about the chart-heavy page only. The two-chart control separates on blocking time by 299 ms against its own 233 ms of drift, which clears the bar but not comfortably, and its other metrics do not clear it at all
  • • Lighthouse under CPU throttling is a lab instrument. It is the instrument the gate uses, which is why it was chosen, but nothing here is field data from real readers

Risk Assessment

The deferral has exactly one failure mode, and it is silent. If the observer never fires — an old browser, an extension that stubs it out, a scroll that jumps past the root margin — the prose still renders, the page still scores well, and the reader simply never sees the picture. Nothing in a performance measurement would catch that, because a chart that never mounts is the fastest chart there is. That inversion is worth stating plainly: the metric this work optimises rewards the bug it introduces.

Abhishek Kushwaha

Written by Abhishek Kushwaha

Full-stack software engineer in Kathmandu, Nepal — six years shipping production Django and Next.js systems, most recently at Pinakin Technologies & Research Center. Writes Global Tech Search on what the AI buildout costs in power, water and silicon, measuring it first-hand where he can. More about the author →