Skip to content

Commit

Permalink
Temporarily disable steady ticks on progress bars
Browse files Browse the repository at this point in the history
This fixes an issue where the fps and eta would not update
until the very end of the encode.

See also console-rs/indicatif#493
  • Loading branch information
shssoichiro committed Nov 14, 2022
1 parent 03b8391 commit a47ddee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions av1an-core/src/progress_bar.rs
Expand Up @@ -83,7 +83,7 @@ pub fn init_progress_bar(len: u64) {
PROGRESS_BAR.get_or_init(|| ProgressBar::new(len).with_style(spinner_style()))
};
pb.set_draw_target(ProgressDrawTarget::stderr_with_hz(60));
pb.enable_steady_tick(Duration::from_millis(100));
// pb.enable_steady_tick(Duration::from_millis(100));
pb.reset();
pb.reset_eta();
pb.reset_elapsed();
Expand Down Expand Up @@ -187,7 +187,7 @@ pub fn init_multi_progress_bar(len: u64, workers: usize, total_chunks: usize) {

let pb = ProgressBar::hidden();
pb.set_style(pretty_progress_style());
pb.enable_steady_tick(Duration::from_millis(100));
// pb.enable_steady_tick(Duration::from_millis(100));
pb.reset_elapsed();
pb.reset_eta();
pb.set_position(0);
Expand Down

0 comments on commit a47ddee

Please sign in to comment.