perf: batched validate/map#3329
Open
rasmusfaber wants to merge 1 commit intoUKGovernmentBEIS:mainfrom
Open
Conversation
d65cec8 to
e32a9a3
Compare
Batch _validate_read and _map_file calls concurrently in the log-headers endpoint instead of validating then mapping sequentially. The readahead caching for S3 ZipFile reads was dropped as read_log_sample now uses AsyncZipReader instead of synchronous ZipFile. Co-Authored-By: Claude Opus 4.6 <[email protected]>
e32a9a3 to
36a13bb
Compare
Contributor
Author
|
#3189 introduced a better fix for the zip file readahead with the |
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.
This PR contains:
What is the current behavior? (You can also link to an open issue here)
The
log-headersFastAPI endpoint validates all files first in a task group, then maps them sequentially withawaitin a list comprehension.What is the new behavior?
Batches
_validate_readand_map_fileinto a single concurrent task group, so validation and mapping happen together per file rather than in two separate passes.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Other information:
Extracted from #3213.