Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Two related changes that make navigating the docs feel instant:
1. Dev server performance
Cause: Astro's dev server walks the page's module graph on each request. For every import it calls
isImportedBy, which reads Vite'simportersgetter. That getter rebuilds a Set of every importer on each read.@chainlink/blocksre-exports ~3,670 icons from its root barrel, and every icon importsiconVariants.ts— roughly 27M iterations per request.Fix:
astro+5.18.2.patch— a 10-line change that reads the per-environment importer Sets directly instead of going through the slow getter. Applied automatically by the existingpatch-packagepostinstall.tailwind.config.js— stop scanning MDX pages and the ~3,700 icon files. Neither contributes any classes, but together they were ~80% of Tailwind's cold start.2. Client-side navigation
The site was doing a full document load on every click creating an annoying white flash between pages, which many docs sites do not have. Makes the docs feel slow.
ClientRoutertoBaseLayout.astroprefetchinastro.config.ts(hover strategy, so we don't prefetch all ~160 sidebar links at once)Follow-on fixes this required:
headscripts now usedata-astro-rerunso they re-run after each navigationDOMContentLoadedlisteners switched toastro:page-load, which fires on both initial load and every client-side navigationpointer-events: noneonbody(Radix scroll lock). Navigating from a link inside the dialog unmounted it without running Radix's cleanup, leaving the lock behind. Added a guard that clears a stale lock after each navigation.