Skip to content

two bench pages shipped 3,000 swaps to show 50, and the hub drew 104 lines in a 400 px card - #2955

Merged
Flotapponnier merged 1 commit into
devfrom
perf/lighter-fat-pages
Oct 12, 2026
Merged

Flotapponnier merged 1 commit into
devfrom
perf/lighter-fat-pages

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

ISR Writes is now the largest line of the Vercel bill ($1.58/day), and it bills per 8 KB written, so page weight × regenerations is the cost.

Terminal fill / execution quality (2.4 MB each). 85% of the HTML was the audit table's ~3,000 swaps passed as a client prop, for a table that shows 50. The page now embeds the 50 most recent; the table fetches the full sample from the new /api/terminal-fills/swaps (CDN-cached 5 min, same cadence as the harness JSON) after hydration. Until it lands, the summary strip reads "Loading all N swaps…" and the CSV button is disabled, so no statistic is ever computed on the partial set. Locally: 2.4 MB → 0.78 MB (dev build).

/benchmarks (2.5 MB, 1 MB of sparkline SVG). One card drew 104 polylines in 400 × 48.

  • Cards draw their 12 best lines; the legend's "+N more" now counts results, not drawn series.
  • toBenchmarkCardData ships only the drawn series.
  • Coordinates rounded to one decimal; shared stroke attributes hoisted to one <g>.
  • Sparkline markup 955 KB → 589 KB.

Checks: tsc, eslint on the touched files, bun test src/lib src/data (453 pass), local render of the three pages and the new route.

…lines in a 400 px card

terminal-fill-quality and terminal-execution-quality were 2.4 MB of HTML
each, 85% of it the audit table's full sample serialised as a client
prop. The page now embeds the 50 most recent rows and the table fetches
the rest from /api/terminal-fills/swaps (CDN-cached 5 min) after
hydration; the summary strip and the CSV wait for the full set.

/benchmarks was 2.5 MB, 1 MB of it sparkline SVG. Bench cards now draw
their 12 best lines (the legend still counts every provider), the card
projection carries only those series, coordinates take one decimal, and
the shared stroke style sits once on a group. Sparkline markup -38%.

ISR writes bill per 8 KB written, so page weight times regenerations is
what that line of the bill measures.
@Flotapponnier
Flotapponnier merged commit f70a199 into dev Oct 12, 2026
2 checks passed
@Flotapponnier
Flotapponnier deleted the perf/lighter-fat-pages branch October 12, 2026 15:00
Flotapponnier added a commit that referenced this pull request Oct 12, 2026
…lines in a 400 px card (#2955) (#2957)

terminal-fill-quality and terminal-execution-quality were 2.4 MB of HTML
each, 85% of it the audit table's full sample serialised as a client
prop. The page now embeds the 50 most recent rows and the table fetches
the rest from /api/terminal-fills/swaps (CDN-cached 5 min) after
hydration; the summary strip and the CSV wait for the full set.

/benchmarks was 2.5 MB, 1 MB of it sparkline SVG. Bench cards now draw
their 12 best lines (the legend still counts every provider), the card
projection carries only those series, coordinates take one decimal, and
the shared stroke style sits once on a group. Sparkline markup -38%.

ISR writes bill per 8 KB written, so page weight times regenerations is
what that line of the bill measures.

(cherry picked from commit f70a199)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant