Repository navigation
Conversation
The cache only streams archives that vt writes itself, so zstd's default `legacy` decoders (pre-1.0 frame formats), `zdict_builder`, and `arrays` features are never used. The legacy decoders were still linked because libzstd's streaming decoder calls them whenever legacy support is compiled in. Disabling the defaults removes 165,408 bytes from the Vite+ NAPI binding on darwin-arm64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fspy benchmarklinuxmacoswindows |
This branch has not been 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.
Motivation
vtdepends onzstdwith its default features (legacy,arrays,zdict_builder). The cache only streams archives thatvtwrites itself throughzstd::Encoderandzstd::Decoder, including the ones restored from a remote cache. It never decodes the pre-1.0 zstd frame formats, builds dictionaries, or uses the array helpers. The legacy decoders were still linked, because libzstd's streaming decoder calls them whenever legacy support is compiled in.This matches astral-sh/uv#22242, which disabled unused Zstandard support in
uv-build.Disabling the defaults shrinks the Vite+ NAPI binding (
vite-plus-cli --features rolldown, release profile, darwin-arm64) from 42,115,952 to 41,950,544 bytes, a 165,408-byte (0.39%) reduction. The baseline patches an unmodified vite-task checkout into vite-plus the same way. Onlyzstd-safe/stdremains enabled, andCargo.lockis unchanged. Vite+ picks this up with its next vite-task bump.🤖 Generated with Claude Code