Skip to content

Refresh rate does not propagate in the MultiProgress #18

@lifthrasiir

Description

@lifthrasiir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions