Skip to content

perf: wave A — cache headers, three.js chunk, client directive downgrades#44

Merged
Bissbert merged 1 commit into
mainfrom
feature/perf-wave-a
May 18, 2026
Merged

perf: wave A — cache headers, three.js chunk, client directive downgrades#44
Bissbert merged 1 commit into
mainfrom
feature/perf-wave-a

Conversation

@Bissbert
Copy link
Copy Markdown
Contributor

Summary

  • public/_headers: adds an immutable one-year cache rule for /fonts/* assets and stale-while-revalidate=86400 on /minerals.db so repeat visits serve the database from the edge cache without revalidation delay.
  • astro.config.mjs: moves three, @react-three/fiber, and @react-three/drei into their own Rollup manual chunk (three), keeping the heavy 3-D renderer out of the main application bundle.
  • src/pages/index.astro: downgrades HeroCrystal3D from client:load to client:idle — the 3-D hero is non-blocking content and should not compete with critical rendering.
  • src/pages/tools/*.astro (7 routes): downgrades React islands on all six tool category pages plus the tools hub from client:load to client:visible — widgets that live below the fold do not need to hydrate until they scroll into view.
  • src/pages/quiz/index.astro: downgrades QuizPage from client:load to client:idle — the quiz UI is interactive but not paint-critical.

Deferred items

  • WA1 (font preload tags) is intentionally deferred to Wave D / WD1 so it lands together with the @fontsource @import migration to stable /fonts/* paths.
  • Two SectionHeader client:load instances on the home page (src/pages/index.astro lines 154, 239) are intentionally left for Wave B / WB3, which swaps them for the existing src/components/ui-astro/SectionHeader.astro static variant.

Reference

Audit folder: audits/perf-2026-05/

…ades

- public/_headers: add immutable /fonts/* cache rule + stale-while-revalidate on /minerals.db
- astro.config.mjs: isolate three / @react-three/fiber / @react-three/drei into their own chunk
- src/pages/index.astro: HeroCrystal3D client:load → client:idle
- src/pages/tools/*.astro (7 routes): React islands client:load → client:visible
- src/pages/quiz/index.astro: QuizPage client:load → client:idle

Part of audits/perf-2026-05/ remediation. WA1 (font preload) intentionally
deferred to Wave D / WD1 so it lands together with the @fontsource @import
migration to stable /fonts/* paths. The two SectionHeader client:load
instances on the home page (src/pages/index.astro:154, 239) are
intentionally left for Wave B / WB3 which swaps them for the existing
src/components/ui-astro/SectionHeader.astro variant.
@github-actions
Copy link
Copy Markdown

🚀 Preview deployed to: https://aa85313e.gemmology-dev.pages.dev

@Bissbert Bissbert merged commit 5ffc894 into main May 18, 2026
5 of 6 checks passed
@Bissbert Bissbert deleted the feature/perf-wave-a branch May 18, 2026 10:25
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