Skip to content

Reuse the ZSTD context across CompressionAnalyzer calls. - #999

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_983583135
Sep 22, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_983583135

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 18, 2026

Copy link
Copy Markdown

Reuse the ZSTD context across CompressionAnalyzer calls.

ZSTD_compress() builds and tears down a full compression context on every
call: at level 1 that is a ~1 MiB workspace malloc'd and freed through the page
heap once per sampled allocation while building a heap profile. Create one
ZSTD_CCtx per CompressionAnalyzer and drive it with ZSTD_compressCCtx(), which
mirrors ZSTD_compress() semantics (explicit level, no sticky parameters) so
compressed byte counts are unchanged.

@copybara-service copybara-service Bot changed the title Reuse the ZSTD context and skip compressing all-zero samples in CompressionAnalyzer. Reuse the ZSTD context across CompressionAnalyzer calls. Sep 21, 2026
@copybara-service
copybara-service Bot force-pushed the test_983583135 branch 13 times, most recently from 3c97376 to 41ababc Compare September 22, 2026 16:20
ZSTD_compress() builds and tears down a full compression context on every
call: at level 1 that is a ~1 MiB workspace malloc'd and freed through the page
heap once per sampled allocation while building a heap profile.  Create one
ZSTD_CCtx per CompressionAnalyzer and drive it with ZSTD_compressCCtx(), which
mirrors ZSTD_compress() semantics (explicit level, no sticky parameters) so
compressed byte counts are unchanged.
PiperOrigin-RevId: 986046841
@copybara-service
copybara-service Bot merged commit 161bcae into master Sep 22, 2026
15 checks passed
@copybara-service
copybara-service Bot deleted the test_983583135 branch September 22, 2026 16:30

This branch was successfully deployed

1 active deployment
github-pages 161bcaee Deployed Sep 22, 2026 by github-pages[bot] via deploy #2765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant