Skip to content

The new progressbar flickers badly #4757

Closed

Description

@bjorn3

Verification

Problem

When there are multiple progressbars being updated at the same time, there is heavy flickering when using Konsole.

Steps

  1. rustup update

Possible Solution(s)

Reduce update interval to at most twice every second and/or use the synchronized update escape codes: https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec

Notes

No response

Rustup version

rustup 1.29.0 (28d1352db 2026-03-05)

Installed toolchains

Not relevant

OS version

Linux

Activity

  1. rami3l commented on Mar 17, 2026

    @rami3l
    Member

    @bjorn3 Thanks for reporting! I think @djc has lowered the tickrate to 20 per second in #4602... Would you mind testing a little bit on your side by editing that value to see how low we could go without making the animation super laggy?

    Or, alternatively, maybe we can add an env var to tweak that value?

  2. djc commented on Mar 17, 2026

    @djc
    Contributor

    Or, alternatively, maybe we can add an env var to tweak that value?

    Pff, let's not go there for this. Adding more configuration surface does not make things better in the grand scheme of things, it just requires users to build more expertise.

  3. ehuss commented on Mar 28, 2026

    @ehuss
    Contributor

    I'm experiencing significant flicker on Windows as well. This is with Windows Terminal using a build from latest main (0a96a33):

    rustup-flicker.mp4
  4. rami3l commented on Mar 28, 2026

    @rami3l
    Member

    @ehuss What would be a better value in your opinion? Will 2 ticks per second as mentioned above suffice?

  5. ChrisDenton commented on Mar 29, 2026

    @ChrisDenton
    Member

    I'm admittedly not too familiar with the library we use for the progressbar.

    Is there a way to stop it redrawing the whole line when only a part has changed?

    Could the update itself be faster? I mean from the video it looks like it first clears the output then prints the new output. Could it just overwrite in a single pass? Or somehow reduce the delay between the two so it's unnoticeable?

  6. rami3l commented on Mar 29, 2026

    @rami3l
    Member

    @ChrisDenton Possibly .set_move_cursor() is here to help but since I don't have the environment to reproduce the issue, I'm not sure what will fix or mitigate this...

    If I understand it correctly, the flickering is happening because the terminal emulator is too slow for our output mode. If you can reproduce it with Windows Terminal then maybe give it a try?

  7. ChrisDenton commented on Mar 29, 2026

    @ChrisDenton
    Member

    Using set_move_cursor does seem to help. I'll put up a PR and hopefully others can test it.

  8. DHowett commented on Jul 20, 2026

    @DHowett

    Even 20 updates per second seems like a lot for a meter with an ETA with a one-second resolution. Why does it need to update more than, say, two times per second? One minute of downloading produces 100-200kb per progress bar of data on stdout at 20 ticks per second...

    I'm sorry if you get a second copy of this. I posted it with the wrong account the first time.

  9. rami3l commented on Jul 20, 2026

    @rami3l
    Member

    @DHowett This has previously been discussed in #4757 (comment) and it seems (according to those who reported) that the said tickrate change is not required to address the issue, so nothing has been modified in that respect since.

  10. ChrisDenton commented on Jul 20, 2026

    @ChrisDenton
    Member

    Yes, reducing the update rate would be a separate issue. This issue was caused by the time between clearing a line and drawing the new line, which should have been instantaneous but wasn't. Even if we only updated once a minute, there would still have been a flicker when it does update. However that should be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions