Repository navigation
perf: prepare streamed archive member names once - #1158
Merged
Merged
Conversation
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.
Prepare an archive member's requested name once per streamed open instead of repeating that work for every preceding header. Preserve lookup semantics and add focused first-member and missing-member performance controls.
AG;DR
Implementation:
string_viewinto eachMemberSource::Open. It borrows that source's owned member name only for the duration of the open; no allocation, lock, retained cache, or lifetime policy changes.cc_testand extend the existing manual archive benchmark with 16 first/missing controls: 10/10,000 headers, normal/prefixed requests, and reused/fresh wrappers. Fresh means a new wrapper and archive cursor, not cold operating-system caches.Production measurements use the exact shipping
clang_release/xff_fullThinLTO recipes, RAM-backed trees, one requested worker, an independent output oracle on every invocation, one discarded warmup, and nine measured rounds retaining seven. Main/candidate/independent byte-identical copy rotate once each per round. Both hosts pass all 340 native invocation oracles. The full 10,000-member archive searches change by:The unchanged 48-case archive-source kernel has a descriptive last-member geometric change of -3.32% Mac and -4.36% Linux; it is not a weighted deployment workload. Actual configured unstripped full CLI sizes change by zero bytes on Mac and +120 bytes on Linux. Frozen image identities and actual configured artifacts are retained; these are not tagged-release asset sizes.
Tradeoffs and limits:
Development validation:
These development checks are scoped to their recorded revisions. The signed runtime commit
b961a4bf977691f8e76e31b7dcf582cede6596f7has the same complete tree as qualifiedc041358fdb6cbf42849f1d88cee2c67af44bf23eafter rebasing onto the squash merge of #1157. Later changes add only common benchmark controls, report/data, mappings and tracking. This PR receives its own current-head checks; no previous PR's statuses substitute for them. At the current pushed head733c6208a6eb043d8caef1c9b4ee9e9f3b2cdb06, both hosts pass all 345 configured release targets (valid unchanged-input cache reuse) and eight freshly executed affected archive/read-source suites; tracked source hashes remain unchanged. Actual configured shipping CLI and new control-helper outputs from this exact head are byte-identical to their measured candidate images on both hosts. The real-API release-site build and link validation pass, and both published data downloads match their recorded hashes. Normal signed commit and pre-push hooks pass. This PR's own current-head workflow is Test 42680343313; all required checks, including the finaldoneaggregate, have completed successfully.Base: current main
91437fef41f86c7f048dd542e77f21103d4e1268; #1157 is merged. Its post-merge Test and Benchmarks workflows have both completed successfully after recovery from GitHub's November 9 Actions/Checks outage; no source workaround or protection bypass was used.