Technical notes
Technical Note

Performance budget for a visual portfolio

A practical budget that allows rich photography and a 3D map without turning every page into a heavy app.

June 9, 2026 4 focus areas
PerformanceImagesBuild checksStatic data

Constraint

A proof-of-work site needs large images, but it should still feel immediate. The fastest version is not the one with the fewest features. It is the one where each feature pays rent.

Rousseau.tv treats JavaScript as an exception. Standard content pages ship as static HTML and optimized assets. The 3D map is the only major interactive bundle because it is the one place where runtime rendering clearly demonstrates a system.

Current budget

  • No JavaScript bundles outside the 3D terrain map and search; other pages carry only small inline helpers for image fades, freshness labels, and the photo lightbox.
  • A separate JavaScript budget for the 3D terrain map.
  • Same-origin demo JSON capped to small payloads.
  • Terrain payload capped separately because it supports an interactive scene.
  • HTML size capped to catch accidental page bloat.
  • Remote asset references blocked except for intentional profile links.

Image strategy

Images are source assets in the repository and optimized during the Astro build. Public pages reference generated AVIF and WebP files with stable dimensions, so cards and galleries do not shift while loading.

The homepage loads the opening images eagerly and leaves deeper gallery items lazy. That gives the first screen visual weight without making every route pay for the full library immediately.

Why it matters

For destination work, performance is part of the product. Visitors may be on mobile connections, staff may need quick reference pages, and public-facing systems should not require a fragile runtime stack just to show useful information.

The build checks make that bias concrete. If a future change adds unexpected JavaScript, oversize JSON, broken links, or public identity leaks, the deploy should fail before the site is updated.