mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #436] [MERGED] perf: startup and cache micro-optimizations #571
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#571
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/436
Author: @Divkix
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:perf/startup-and-cache-micro-optimizations📝 Commits (6)
bd1f6c1perf: cache startup filesystem scans, optimize base64 and path normalizationc0b75a5fix: validate base64 structural length and improve test spy cleanup7385c3bfix: address bonk review comments — composite mdx cache key, postcss comment order, hoist test importdf119fbMerge remote-tracking branch 'origin/main' into perf/startup-and-cache-micro-optimizations6a8a891fix: cache Promise in resolvePostcssStringPlugins to prevent concurrent scan race; add POST urlOverride test8f2ec4afmt📊 Changes
6 files changed (+511 additions, -23 deletions)
View changed files
📝
packages/vinext/src/cloudflare/kv-cache-handler.ts(+16 -12)📝
packages/vinext/src/index.ts(+38 -5)📝
packages/vinext/src/server/prod-server.ts(+18 -6)📝
tests/kv-cache-handler.test.ts(+63 -0)➕
tests/node-to-web-request.test.ts(+114 -0)➕
tests/startup-cache.test.ts(+262 -0)📄 Description
Closes #437
Summary
hasMdxFiles()result per root directory — avoids redundant recursive filesystem walks whenconfig()fires per Vite environment (RSC/SSR/Client = 3+ times)resolvePostcssStringPlugins()result per project root — skips repeatedexistsSyncchecks across 17 PostCSS config file candidates on eachconfig()invocationBufferAPIs for significantly faster serializationnodeToWebRequest()in App Router prod server — eliminates redundantnormalizePathcall in the RSC handler for pathological URLsTest plan
tests/startup-cache.test.ts— MDX scan caching (5) and PostCSS config caching (4)tests/kv-cache-handler.test.ts— 1 MiB buffer, null bytes, all 256 byte valuestests/node-to-web-request.test.ts—urlOverrideparameter behaviortsgo --noEmit) cleanoxlint) cleanoxfmt --check) clean🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.