-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #6615 - ehuss:progress-updates, r=alexcrichton
Improve progress bar flickering. This attempts to reduce the amount of flickering primarily by reducing the number of times the progress bar is updated. The outline of changes: - Don't display the progress bar for all the initial "Fresh" messages (if -v is not given). - Don't redisplay the progress bar if it hasn't changed. - Don't clear the progress bar if it is not displayed. - Don't clear the progress bar for `Message` events that don't print anything. - Drain messages in batches to avoid frequently updating the progress bar. - Only display progress bar if the queue is blocked. This significantly improves the initial "fresh" updates, but I still see some flickering during normal updates. I wasn't able to figure out why. Logging to a file and doing screen captures I see cargo is printing the progress bar <1ms after it is cleared. I'm guessing that it's just bad timing where the terminal renders just before the progress bar is displayed, and it has to wait an entire rendering cycle until it gets displayed. I tested on a variety of different terminals and OS's, but the more testing this can get the better. This unfortunately adds some brittleness of carefully clearing the progress bar before printing new messages. I don't really see an easy way to make that better since there is such a wide variety of ways a `Message` can be printed. Fixes #6574
- Loading branch information
Showing
4 changed files
with
146 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.