mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #372] [MERGED] perf: parallelise metadata and viewport resolution #519
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#519
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/372
Author: @james-elicx
Created: 3/9/2026
Status: ✅ Merged
Merged: 3/9/2026
Merged by: @james-elicx
Base:
main← Head:j-branch-11📝 Commits (6)
8812ae1perf: parallelise metadata and viewport resolution9077108fix: propagate page generateMetadata errors to error boundary2b3d082Merge remote-tracking branch 'origin/main' into fix/metadata-error-propagation71b5bfctest: update snapshots622dd58fix: log layout generateMetadata/generateViewport errors instead of silently swallowing them4d126e6regen snaps📊 Changes
2 files changed (+196 additions, -189 deletions)
View changed files
📝
packages/vinext/src/server/app-dev-server.ts(+28 -27)📝
tests/__snapshots__/entry-templates.test.ts.snap(+168 -162)📄 Description
What
Converts sequential
awaitloops forgenerateMetadata()andgenerateViewport()resolution intoPromise.all, so all layouts' metadata is resolved concurrently rather than one-at-a-time.Why
For deeply nested App Router layouts that do async I/O in
generateMetadata()(KV reads, fetches, DB queries), the old serial approach meant total metadata resolution time wassum(individual times). WithPromise.allit becomesmax(individual times).Details
console.error) rather than crashing the page — a layout'sgenerateMetadata()failing shouldn't take down the whole rendergenerateMetadata()errors are intentionally not swallowed — they propagate to the nearesterror.tsxorglobal-error.tsxboundary, matching Next.js behaviorRelated
generateMetadata()parentparameter is not yet supported🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.