Skip to content

Commit

Permalink
increase renderer buffer size
Browse files Browse the repository at this point in the history
The default buffer size is tiny (128 bytes), resulting in many calls to tcdrain
during rendering.

Make the buffer a more reasonable 4096 bytes.
  • Loading branch information
markbt authored and wez committed May 18, 2019
1 parent 4ca7214 commit 57983c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion termwiz/src/terminal/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::render::terminfo::TerminfoRenderer;
use crate::surface::Change;
use crate::terminal::{cast, Blocking, ScreenSize, Terminal};

const BUF_SIZE: usize = 128;
const BUF_SIZE: usize = 4096;

/// Helper function to duplicate a file descriptor.
/// The duplicated descriptor will have the close-on-exec flag set.
Expand Down

0 comments on commit 57983c2

Please sign in to comment.