ProgressBar and MultiProgress both share the common refresh rate mechanism (via set_draw_target). But since the rate limiting occurs at the final draw stage, MultiProgress gets much more slower than ProgressBar alone when there are more than thousands of state updates.
In my naive benchmark, which makes one ProgressBar, optionally adds it to MultiProgress, and runs 1,000,000 inc(1) calls:
- Without
MultiProgress it took 9.6 seconds (104,000 calls/s);
- With
MultiProgress it took 69.2 seconds (14,400 calls/s).
I expect that along with the MPSC Sender the refresh rate should be shared across ProgressBars.
ProgressBarandMultiProgressboth share the common refresh rate mechanism (viaset_draw_target). But since the rate limiting occurs at the final draw stage,MultiProgressgets much more slower thanProgressBaralone when there are more than thousands of state updates.In my naive benchmark, which makes one
ProgressBar, optionally adds it toMultiProgress, and runs 1,000,000inc(1)calls:MultiProgressit took 9.6 seconds (104,000 calls/s);MultiProgressit took 69.2 seconds (14,400 calls/s).I expect that along with the MPSC
Senderthe refresh rate should be shared acrossProgressBars.