Skip to content
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

TqdmCallback: make it lazy #7715

Merged
merged 1 commit into from
May 10, 2022
Merged

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented May 9, 2022

Makes progress bar lazy, so this won't instantiate tqdm progress bars right away (unless set_size/relative_update/absolute_update are called).

As we don't use rich progressbar and we may lift the place where we create tqdm progress bars, I am not fixing it for now.

#7597 (comment)

@skshetry skshetry added enhancement Enhances DVC refactoring Factoring and re-factoring ui user interface / interaction skip-changelog Skips changelog A: data-management Related to dvc add/checkout/commit/move/remove labels May 9, 2022
@skshetry skshetry requested a review from dtrifiro May 9, 2022 14:19
@skshetry skshetry self-assigned this May 9, 2022
@skshetry skshetry requested a review from a team as a code owner May 9, 2022 14:19
@dtrifiro
Copy link
Contributor

dtrifiro commented May 9, 2022

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

@skshetry skshetry merged commit 8fb2f65 into iterative:main May 10, 2022
@skshetry skshetry deleted the lazy-tqdm-callbacks branch May 10, 2022 07:56
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 enhancement Enhances DVC refactoring Factoring and re-factoring skip-changelog Skips changelog ui user interface / interaction
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants