Repository navigation
Reuse archive input buffers without per-chunk allocations - #1066
Merged
Merged
Conversation
…nto perf/borrow-normalized-shingles
…nto perf/borrow-normalized-shingles
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.
Archive reads now reuse caller-owned input storage instead of allocating a new string for every chunk. This reduces allocation churn and improves large TAR workloads while preserving decoder fallbacks, read budgets and error handling.
AG;DR
Dependency and merge order: #1065 and #1059 are merged. This PR is now based directly on
main; #1067 remains its dependent follow-up. The synchronization retains both the archive-buffer implementation and all five merged dependency updates. Existing cross-platform timing below was collected on the fixed #1059 parent before #1065; it is historical qualification, not a claim that the updated dependency configuration has already been remeasured. Current-head CI verifies the synchronized configuration.Implementation:
ReadInto; the libarchive callback borrows only the initialized byte range.Cross-platform qualification on the fixed #1059 parent:
The report
docs/benchmarks/archive-input-buffers-20261102.mdlinks lossless source/configuration, timing, correctness, allocation and earlier rejected/prototype evidence. Every final variant was formatted with its actual filename before building; final source guards prevent validation against a builder-restored variant. Earlier populations remain separate rather than being attributed to the final code. O19b ZIP seeking/indexing and decoder admission remain open.Local scoped clang-tidy passed for the three changed C++ translation units. Normal enforcing commit/push hooks and this PR’s current-head CI determine publication/readiness; local development validation does not substitute for those checks.