-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: range requests for wheel #66
Conversation
// Get the size of the entry plus the header + size of the filename. We should also actually | ||
// include bytes for the extra fields but we don't have that information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens now that we don't know this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cross our fingers that the entry doesnt include extra fields. But because we also align to the bufreader size most likely we dont need to do another range request anyway. In the worst case another range request is performed.
Co-authored-by: Tim de Jager <[email protected]>
// Make sure we have the back part of the stream. | ||
// Because the zip index is at the back | ||
stream | ||
.prefetch(stream.len().saturating_sub(16384)..stream.len()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is 16384
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good question! Thats my best guess at the size of the central archive directory (the index). Sometimes its more, which then causes another range requests but most of the times it less.
Co-authored-by: Tim de Jager <[email protected]>
Ouch we have a conflict |
Which is now fixed. |
An implementation to use range requests to read metadata from wheels. This speeds up metadata fetching for large wheels significantly.