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
Avoid repetitive open/write/close on mlar extract #143
Merged
Conversation
This file contains 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
commial
force-pushed
the
extract-keep-fd
branch
from
February 15, 2023 08:15
1057af1
to
d3b1b19
Compare
commial
force-pushed
the
extract-keep-fd
branch
from
September 29, 2023 19:07
d3b1b19
to
a57ee04
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
commial
force-pushed
the
extract-keep-fd
branch
from
September 29, 2023 20:28
04cdc2a
to
b2b0158
Compare
Benchmark for 0acaa8bClick to view benchmark
|
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.
mlar extract
, when no other argument are provided, is usinglinear_extract
with aFileWriter
to extract files.To avoid consuming too much file descriptor, each file block is written with a:
pattern.
While this is fine for some usage, it could be syscall-intensive on other. For instance, if an archive is made of a files splitted in many chunks, most of the extraction time could be loss in the user<->kernel interaction.
This PR try to improve that behavior by adding a LRU cache (with an arbitrary size of 1000) on the file descriptor pool.