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

Remove each progress bar immediately upon completion #1814

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

brianaydemir
Copy link
Contributor

@brianaydemir brianaydemir commented Dec 7, 2024

The overall effect of this PR is to make it so that the client displays progress bars only for "in progress" and "recently completed" transfers. For large, recursive transfers and syncs, this:

  • Prevents noisy scrollback buffers.

  • Bounds the number of progress bars being displayed to something closer to the number of worker threads and not the total number of objects being transferred, which in turn reduces the number of progress bars that must be removed from the terminal's display when the client exits.

To achieve this:

  1. When each progress bar is created, we configure it to be removed when its "completed" event is triggered.

  2. We enable each progress bar to trigger a "completed" event when we set its total size. (Because each progress bar was originally created with a size of zero, they will not trigger a "completed" event otherwise.)

And for good measure:

  • I reduced the frequency of updates. Every half-second is more than enough to give a feeling of real-time updates.

  • I'm letting the deferred progressCtr.Wait() handle any clean up, rather than Wait()ing on each progress bar one at a time.

@turetske turetske merged commit d4464da into PelicanPlatform:main Dec 13, 2024
21 checks passed
@brianaydemir brianaydemir deleted the issue-1612 branch December 14, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client Issue affecting the OSDF client
Projects
None yet
2 participants