Skip to content

perf(nav): disable eager prefetch on site-wide nav links - #268

Merged
akeight merged 1 commit into
mainfrom
perf/nav-disable-prefetch
Aug 13, 2026
Merged

perf(nav): disable eager prefetch on site-wide nav links#268
akeight merged 1 commit into
mainfrom
perf/nav-disable-prefetch

Conversation

@akeight

@akeight akeight commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Hardens against the Worker exceeded CPU time limit burst seen in production (all routes, including the static /icon.svg, failed for ~1s then recovered).
  • Root cause: the nav pill renders on every page, so Next's default <Link> prefetch fired an RSC request for each nav route (/deck, /globe, /resources, /) on load. A burst of those concurrent server renders saturated the Worker isolate.
  • Sets prefetch={false} on the desktop nav links, logo, submit CTA, and mobile-menu links. Navigation still works (Next fetches on hover/tap); only the eager on-load fan-out is removed.

Notes

  • Complementary to the Workers plan CPU cap (Free ~10ms vs Paid 30s), which is the underlying enabler and is being checked separately.

Test plan

  • Merge to main; confirm Workers Builds deploys production.
  • With wrangler tail hackhq running, load /, navigate to /deck and /globe; confirm no RSC prefetch burst on load and no CPU-limit errors.
  • Links still navigate correctly on hover/click.

Made with Cursor

The nav pill renders on every page, so Next's default Link prefetch fired
an RSC request for each nav route (/deck, /globe, /resources, /) on load.
A burst of those concurrent server renders saturated the Worker isolate,
surfacing as "exceeded CPU time limit" across all routes for ~1s (static
assets included) before recovering. Set prefetch={false} on the desktop
nav links, logo, submit CTA, and mobile-menu links so routes are fetched
on hover/tap instead of eagerly on load.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hackhq Ready Ready Preview Aug 13, 2026 4:08pm

Request Review

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hackhq 9a24c29 Commit Preview URL

Branch Preview URL
Aug 13 2026, 04:09 PM

@akeight
akeight merged commit 126dd7a into main Aug 13, 2026
5 checks passed
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