Skip to content

Commit

Permalink
Set TUI FPS (#2783)
Browse files Browse the repository at this point in the history
New version of Cursive allows to set fps, the existing  set_autorefresh sets 30 fps. This change decreases CPU usage from 50-65% to 15-25% on my machine.
  • Loading branch information
hashmap authored and garyyu committed Apr 30, 2019
1 parent 304ae44 commit 3d0f9bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bin/tui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl UI {
.send(ControllerMessage::Shutdown)
.unwrap();
});
grin_ui.cursive.set_autorefresh(true);
grin_ui.cursive.set_fps(3);
grin_ui
}

Expand Down

0 comments on commit 3d0f9bd

Please sign in to comment.