1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00

revise ratelimit_output_bytes_per_second default

I've found that 10_000/s strikes a reasonable balance between
output speed and the ability to interrupt the output.

Refs: https://github.com/wez/wezterm/issues/65
This commit is contained in:
Wez Furlong 2019-11-22 01:57:19 +00:00
parent 06da330087
commit 824ec691fe
2 changed files with 3 additions and 7 deletions

View File

@ -129,8 +129,8 @@ term = "xterm-256color"
# This acts as a brake in the case of a command spewing a
# ton of output and allows for the UI to remain responsive
# so that you can hit CTRL-C to interrupt it if desired.
# The default value is 2MB/s.
ratelimit_output_bytes_per_second = 2097152
# The default value is 10,000 bytes/s.
ratelimit_output_bytes_per_second = 10000
# Constrains the rate at which the multiplexer server will
# unilaterally push data to the client.

View File

@ -49,11 +49,7 @@ fn read_from_tab_pty(config: Arc<Config>, tab_id: TabId, mut reader: Box<dyn std
const BUFSIZE: usize = 32 * 1024;
let mut buf = [0; BUFSIZE];
let mut lim = RateLimiter::new(
config
.ratelimit_output_bytes_per_second
.unwrap_or(2 * 1024 * 1024),
);
let mut lim = RateLimiter::new(config.ratelimit_output_bytes_per_second.unwrap_or(10_000));
loop {
match reader.read(&mut buf) {