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
fs: optimize dvc list --recursive #8150
Merged
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
skshetry
reviewed
Aug 19, 2022
rlamy
force-pushed
the
optimize-recursive-ls
branch
from
August 22, 2022 12:07
caec371
to
c4b8b19
Compare
fs.walk(..., dvc_only=True) already outputs dvc objects only, so fs.isdvc(path, recursive=True) is always True.
rlamy
force-pushed
the
optimize-recursive-ls
branch
from
August 23, 2022 17:47
4b4f25d
to
64d829f
Compare
I think this is ready to merge. In my local benchmarks, the PR brings time down from 104 s to 38 s. |
For the record: discussed during team meetings that we can go step-by-step here and it is worth merging this considering the results that it brings already 🙂 |
efiop
changed the title
[WIP] fs: optimize dvc list --recursive
fs: optimize dvc list --recursive
Aug 23, 2022
efiop
approved these changes
Aug 23, 2022
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.
🔥
efiop
added
performance
improvement over resource / time consuming tasks
A: data-management
Related to dvc add/checkout/commit/move/remove
labels
Aug 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A: data-management
Related to dvc add/checkout/commit/move/remove
performance
improvement over resource / time consuming tasks
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.
See #8135 for context.
._get_key()
is quite expensive. The general idea is to avoid flip-flopping between path and "key" representations.