[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39595: Improve zipfile.Path performance #18406

Merged
merged 7 commits into from Feb 12, 2020
Merged

bpo-39595: Improve zipfile.Path performance #18406

merged 7 commits into from Feb 12, 2020

Conversation

Copy link
Member

jaraco commented Feb 7, 2020

In jaraco/zipp#32, I learned that the zipfile.Path and zipp.Path objects were O(n) for joinpath and entries, causing O(n^2) complexity for other operations, including those used by importlib.metadata. This change incorporates those changes, released with zipp 1.1 and 2.1.

https://bugs.python.org/issue39595

Copy link

codecov bot commented Feb 7, 2020

Codecov Report

Merging #18406 into master will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #18406     +/-   ##
=========================================
  Coverage   82.11%   82.12%             
=========================================
  Files        1955     1955             
  Lines      588928   583715   -5213     
  Branches    44428    44436      +8     
=========================================
- Hits       483611   479354   -4257     
+ Misses      95667    94715    -952     
+ Partials     9650     9646      -4     
Impacted Files Coverage Δ
Lib/distutils/tests/test_bdist_rpm.py 30.00% <0.00%> (-65.00%) ⬇️
Lib/distutils/command/bdist_rpm.py 7.63% <0.00%> (-56.88%) ⬇️
Lib/test/test_urllib2net.py 76.92% <0.00%> (-13.85%) ⬇️
Lib/test/test_smtpnet.py 78.57% <0.00%> (-7.15%) ⬇️
Lib/ftplib.py 63.85% <0.00%> (-6.06%) ⬇️
Lib/test/test_ftplib.py 87.11% <0.00%> (-4.72%) ⬇️
Tools/scripts/db2pickle.py 17.82% <0.00%> (-3.97%) ⬇️
Tools/scripts/pickle2db.py 16.98% <0.00%> (-3.78%) ⬇️
Lib/test/test_socket.py 71.94% <0.00%> (-3.77%) ⬇️
Lib/distutils/tests/test_bdist_msi.py 56.25% <0.00%> (-3.75%) ⬇️
... and 335 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc7a50d...093b637. Read the comment docs.

Lib/zipfile.py Outdated Show resolved Hide resolved
jaraco changed the title Improve zipfile.Path performance bpo-39595: Improve zipfile.Path performance Feb 9, 2020
jaraco removed the skip issue label Feb 9, 2020
jaraco merged commit e5bd736 into python:master Feb 12, 2020
Copy link

bedevere-bot commented Feb 12, 2020

@jaraco: Please replace # with GH- in the commit message next time. Thanks!

Copy link
Contributor

miss-islington commented Feb 12, 2020

Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

Copy link
Contributor

miss-islington commented Feb 12, 2020

I'm having trouble backporting to 3.8. Reason: 'Error 110 while writing to socket. Connection timed out.'. Please retry by removing and re-adding the needs backport to 3.8 label.

Copy link
Contributor

miss-islington commented Feb 12, 2020

Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

Copy link

bedevere-bot commented Feb 12, 2020

GH-18472 is a backport of this pull request to the 3.8 branch.

jaraco added a commit that referenced this pull request Feb 12, 2020
* Improve zipfile.Path performance on zipfiles with a large number of entries.

* 📜🤖 Added by blurb_it.

* Add bpo to blurb

* Sync with importlib_metadata 1.5 (6fe70ca)

* Update blurb.

* Remove compatibility code

* Add stubs module, omitted from earlier commit

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit e5bd736)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
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.

None yet

5 participants