Repository navigation
ls now collects metadata in a separate thread - #14627
Merged
Merged
Conversation
Contributor
|
very nice! Thanks for working on this. I'm anxious to try it. |
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.
Closes #6174
Description
This PR aims to improve the performance of
lswithin large directories.lsnow delegates the metadata collection toa thread in its thread pool.
Before:

Now:

User-Facing Changes
If an error occurs while file metadata is being collected in another thread, the
lscommand now notifies the user about this error by sending an error value through a channel (which then gets collected into an iterator and shown to the user later on).However, if an error occurs while sending this error value to the channel (i.e the resulting value iterator has been dropped), then the user is not notified of this error. I think this behavior is acceptable, since behavior only occurs when the
lspipeline has been dropped and the user is no longer interested in output fromls.Tests + Formatting
I do not know if it is a good idea to test this performance with
timeit, since it can be unreliable.