TqdmCallback: make it lazy#7715
Merged
Merged
Conversation
Contributor
|
Thanks, by doing some quick benchmarking, I'm seeing some performance improvements when adding a large (10k files) directory: $ time dvc add directory # without patch
real 0m49.129s
user 0m45.815s
sys 0m12.943s
$ time dvc add directory
real 0m27.788s
user 0m24.585s
sys 0m7.760s |
dtrifiro
approved these changes
May 10, 2022
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.
Makes progress bar lazy, so this won't instantiate tqdm progress bars right away (unless
set_size/relative_update/absolute_updateare called).As we don't use
richprogressbar and we may lift the place where we create tqdm progress bars, I am not fixing it for now.#7597 (comment)