Open .conda ZipFile once per extract (B13)#318
Draft
jezdez wants to merge 5 commits into
Draft
Conversation
feb521a to
42868cd
Compare
5 tasks
.conda ZipFile once per extract (B13)
jezdez
added a commit
to jezdez/conda-package-handling
that referenced
this pull request
Apr 27, 2026
Depends on conda/conda-package-streaming#173. Part of conda/conda#15969.
jezdez
added a commit
to jezdez/conda-package-handling
that referenced
this pull request
Apr 27, 2026
133ceb0 to
acb77f5
Compare
acb77f5 to
3bb384e
Compare
Contributor
|
@jezdez this can be continued now that conda-package-streaming has been updated |
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.
Description
cph.streaming._extractiterates over the two components (pkgandinfo) of a.condaarchive, callingcps.stream_conda_componenttwice. Each call internally instantiates a freshzipfile.ZipFile(fileobj), parsing the central-directory end-of-file record from scratch.This PR opens the
ZipFileonce in_extractand threads it through bothstream_conda_componentcalls via the newzf=kwarg added in the companion cps PR (conda/conda-package-streaming#173). No semantic change; saves one ZIP-parse per archive.Depends on conda/conda-package-streaming#173 landing first — without the cps-side
zf=kwarg this is a no-op.Part of the conda-tempo Track B performance work. Tracking issue: conda/conda#15969.
Phase-2 micro-benchmark (bench_s13_zipfile_single.py, 10
.condaarchives, both components):Phase-4 end-to-end (as part of the full cps + cph stack):
Full research report: https://github.com/jezdez/conda-tempo/blob/main/track-b-transaction.md
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?.conda→pkg+inforound-trip; happy to add a regression that asserts only oneZipFileis constructed)