From 5fa5aef7f3eb0f385ecfc048f4e9bd39160bf436 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 13 Mar 2021 14:23:36 -0800 Subject: [PATCH] Disable newline splitting in output processing In a couple of quick tests, this doesn't seem to break cat'ing the emoji test data so it seems like it isn't needed anymore. In addition, it removes a bottleneck from processing image streams produced by timg, which tend to be very large with new newlines. With this change, I'm able to view a 25fps source video at about 60fps. refs: https://github.com/wez/wezterm/issues/537 --- mux/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mux/src/lib.rs b/mux/src/lib.rs index 45112df3a..63ab5e41f 100644 --- a/mux/src/lib.rs +++ b/mux/src/lib.rs @@ -90,11 +90,13 @@ fn accumulator(pane_id: PaneId, dead: &Arc, rx: Receiver>) { buf.append(&mut data); while !buf.is_empty() { + /* if let Some(idx) = buf.iter().rposition(|&b| b == b'\n') { let mut split = buf.split_off(idx + 1); std::mem::swap(&mut split, &mut buf); send_to_mux(pane_id, &dead, split); } + */ match rx.try_recv() { Ok(mut extra) => {