perf: skip hashing temporary prerender chunks - #31
Closed
ttmx wants to merge 1 commit into
Closed
Conversation
Contributor
|
Nimbus doesn't take unsolicited pull requests. See CONTRIBUTING.md. File it instead as:
Once a maintainer takes your issue or discussion forward they'll approve you there, and your PRs stay open from then on. Closing this one. |
Author
|
/bonk |
Collaborator
|
closing I've hardened the changes with this PR |
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
Why
Astro imports the prerender bundle to generate static pages and deletes it afterward. On large sites, Rollup's final hash generation repeatedly walks the transitive graph for thousands of temporary lazy chunks. This Rollup hashing was built for actually shipped bundles, for cache and cache busting purposes, but instead it is used on an intermediate local only build.
On the current Cloudflare Docs build (8,708 pages), an isolated cold-build A/B measured:
That is 2m 20.48s less wall time (30.3%) and 2m 12s less prerender bundling time (57%). Both builds used identical source and had
dist,.astro, and.astro-cacheremoved beforehand.Safety
prerenderenvironment, not client or deployed server outputassetFileNamesis not changedentryFileNames/chunkFileNamessettings winValidation
pnpm --filter nimbus-docs typecheckpnpm --filter nimbus-docs test(426 tests passed)