turbo-persistence: drop key compression dictionary from SST files#90608
Merged
turbo-persistence: drop key compression dictionary from SST files#90608
Conversation
Key blocks are now compressed with plain LZ4 (no dictionary), same as value blocks. This removes the zstd dependency (used only for dictionary building) and simplifies the SST file format by eliminating the dictionary region at the start of each file. Breaking change to the meta file and SST on-disk format.
…n dictionary Remove references to the key compression dictionary from the meta file and SST file format descriptions, and update the small value block compression note to no longer mention dictionaries.
lukesandberg
commented
Feb 26, 2026
lukesandberg
commented
Feb 26, 2026
lukesandberg
commented
Feb 26, 2026
turbopack/crates/turbo-persistence/src/static_sorted_file_builder.rs
Outdated
Show resolved
Hide resolved
lukesandberg
commented
Feb 26, 2026
turbopack/crates/turbo-persistence/src/static_sorted_file_builder.rs
Outdated
Show resolved
Hide resolved
Collaborator
Tests Passed |
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **400 kB** → **400 kB** ✅ -13 B80 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
Merging this PR will not alter performance
Comparing Footnotes
|
Remove leftover code from the key compression dictionary removal: - Remove `blocks_start()` (always returned 0) and inline callers - Remove dictionary parameters from `read_block()`, `decompress_into_arc()`, and `compress_into_buffer()` - Remove `dict` and `long_term` fields from `CompressionConfig` enum - Drop unused `_total_key_size` parameter from `write_static_stored_file()` and its call sites - Simplify `compress_into_buffer()` to use `lz4::compress_to_vec()` directly instead of constructing a `Compressor` object
sokra
approved these changes
Feb 26, 2026
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
The key compression dictionary added complexity (zstd dependency, dictionary computation, dual decompression paths) with diminishing returns. Plain LZ4 is already used for value blocks and provides sufficient compression for key blocks. This simplifies both the SST file format and the compaction/inspection tooling.
This main goal is to unblock streaming SST writes.
What Changed
On-disk format (breaking):
key_compression_dictionary_lengthfieldCode:
zstddependency fromturbo-persistenceStaticSortedFileBuildersst_inspecttool (no more dictionary-aware decompression)key_compression_dictionary_lengthfromStaticSortedFileMetaData,MetaEntry, andMetaFileBuilderDocs:
Test Plan
sst_inspecttool updated to work without dictionary logic