Skip to content

archive/zip: load file data descriptor on demand #48755

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

Closed
wants to merge 2 commits into from

Conversation

tinti
Copy link

@tinti tinti commented Oct 3, 2021

Read file data descriptor only when the file is open.

Previously, during zip.Reader.init, each new file had its data descriptor
read during the file discovery loop. This caused extra reads for those who
want just to list the files.

Fixes #48374

tinti added 2 commits October 3, 2021 19:31
Read file data descriptor only when the file is open.

Previously, during zip.Reader.init, each new file had its data descriptor
read during the file discovery loop. This caused extra reads for those who
want just to list the files.

Fixes golang#48374
Reuse previous body offset read in file data descriptor.
@google-cla google-cla bot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Oct 3, 2021
@gopherbot
Copy link
Contributor

This PR (HEAD: 43a498d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/353716 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@mvdan
Copy link
Member

mvdan commented May 27, 2022

Looks like this was already fixed by https://go-review.googlesource.com/c/go/+/357489 around the same time. Please don't feel discouraged that your change didn't get reviewed and merged - with such a large open source project, duplicated work happens at times.

@mvdan mvdan closed this May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

archive/zip: Performance regression with reading ZIP files with many entries
3 participants