jevangoldsmith.com

Performance Budgets

Status: canonical Audience: engineering, agents Purpose: explain current performance gates and target ratchets

Current Gate

Performance budgets live in data/site.config.json and are checked by scripts/check-performance-budget.js.

Current budgets intentionally match the transition state of the site. They are a guardrail first, not the final goal.

Current Bottlenecks

Target Ratchet

Budget Current Transition Target Long-Term Target
Page CSS <= 90 KB <= 40 KB common plus narrow page CSS
Per-page HTML <= 90 KB <= 30 KB for most pages
Per-page JS <= 50 KB, vendor excluded <= 25 KB for most pages
Nav logo generated density variants, no raw master refs <= 25 KB common case
Logo video generated density variants, hover-loaded only no initial-load video transfer
Inline scripts <= 16 0 public inline scripts
Inline handlers <= 116 0 inline handlers
Inline style blocks <= 33 0 page-level style blocks

Ratchet Rule

Only lower a budget after the relevant refactor lands and browser smoke testing confirms the page still looks and behaves the same.

Performance-Preserving Refactors

  1. Continue moving page styles from inline blocks to CSS source layers.
  2. Keep ratcheting each page bundle by moving rules into the narrowest layer.
  3. Replace inline handlers with delegated module JS.
  4. Keep vendor libraries self-hosted and loaded only where needed.
  5. Keep master imagery in images/source/ and production references in images/generated/.
  6. Do not reference images/logo.png, images/profile.jpg, images/zen-nature.jpg, images/logo-animated.mp4, or images/source/ from public HTML.
  7. Keep images/logo-animated.mp4 and images/source/logo-animated.mp4 protected as source/master assets; production pages should use generated density variants.