perf: wave A — cache headers, three.js chunk, client directive downgrades#44
Merged
Conversation
…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.
|
🚀 Preview deployed to: https://aa85313e.gemmology-dev.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public/_headers: adds an immutable one-year cache rule for/fonts/*assets andstale-while-revalidate=86400on/minerals.dbso repeat visits serve the database from the edge cache without revalidation delay.astro.config.mjs: movesthree,@react-three/fiber, and@react-three/dreiinto their own Rollup manual chunk (three), keeping the heavy 3-D renderer out of the main application bundle.src/pages/index.astro: downgradesHeroCrystal3Dfromclient:loadtoclient: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 fromclient:loadtoclient:visible— widgets that live below the fold do not need to hydrate until they scroll into view.src/pages/quiz/index.astro: downgradesQuizPagefromclient:loadtoclient:idle— the quiz UI is interactive but not paint-critical.Deferred items
@fontsource@importmigration to stable/fonts/*paths.SectionHeaderclient:loadinstances on the home page (src/pages/index.astrolines 154, 239) are intentionally left for Wave B / WB3, which swaps them for the existingsrc/components/ui-astro/SectionHeader.astrostatic variant.Reference
Audit folder:
audits/perf-2026-05/