Skip to content

bpo-45505: ZipFile file header optimization #25966

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

Merged
merged 1 commit into from
May 15, 2022

Conversation

data-ux
Copy link
Contributor

@data-ux data-ux commented May 7, 2021

ZipFile file header optimization

The return value from read() is never used, so we can just seek() to avoid unneeded IO.

_SharedFile.read() implementation already assumes the file is seekable, so should be ok?

The change helps performance in use cases where the fileobject given to ZipFile is backed by high latency IO, eg. HTTP range requests.

https://bugs.python.org/issue45505

closes: gh-89668

@miguendes
Copy link
Contributor

I think you need to create a bpo issue and associate it with this PR.

https://bugs.python.org
https://devguide.python.org/pullrequest/

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 15, 2021
@data-ux data-ux changed the title ZipFile file header optimization bpo-45505: ZipFile file header optimization Oct 18, 2021
to avoid unneeded IO
@corona10 corona10 removed the stale Stale PR or inactive for long period of time. label May 15, 2022
@corona10 corona10 force-pushed the zipfile_extra_seek branch from 17aa8dd to 13596f9 Compare May 15, 2022 14:19
@corona10 corona10 self-assigned this May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove unneeded ZipFile IO
6 participants