asciinema virtual terminal
Vt::builder()
for more flexible building of Vt with desired settingsPreviously:
let mut vt = Vt::new(80, 24);
vt.resizable(true);
// or
let mut vt = Vt::with_scrollback_limit(80, 24, Some(1000));
Now:
let mut vt = Vt::builder().size(80, 24).resizable(true).scrollback_limit(1000).build();
parser::Executor
traitAbove optimizations made vt.feed_str()
roughly 15% faster for typical output stream when compared to v0.8.1, and up to 70% faster when compared to v0.8.0.
criterion benchmark output:
marcin@stacja ~/S/r/a/avt (main)> cargo criterion --bench vt
Compiling avt v0.8.2 (/home/marcin/Sync/repos/asciinema/avt)
Finished bench [optimized] target(s) in 1.47s
Gnuplot not found, using plotters backend
feed mixed in bulk time: [7.5430 ms 7.5508 ms 7.5592 ms]
change: [-46.947% -46.386% -45.812%] (p = 0.00 < 0.05)
Performance has improved.
feed mixed in chunks time: [10.366 ms 10.377 ms 10.389 ms]
change: [-24.810% -24.309% -23.812%] (p = 0.00 < 0.05)
Performance has improved.
feed cacademo in bulk time: [7.2855 ms 7.3083 ms 7.3308 ms]
change: [-3.5582% -3.0732% -2.5738%] (p = 0.00 < 0.05)
Performance has improved.
feed cacademo in chunks time: [8.7286 ms 8.7468 ms 8.7652 ms]
change: [-4.5469% -4.2336% -3.9129%] (p = 0.00 < 0.05)
Performance has improved.
feed licenses in bulk time: [9.9353 ms 9.9457 ms 9.9600 ms]
change: [-69.408% -69.061% -68.712%] (p = 0.00 < 0.05)
Performance has improved.
feed licenses in chunks time: [17.706 ms 17.717 ms 17.728 ms]
change: [-50.115% -49.719% -49.312%] (p = 0.00 < 0.05)
Performance has improved.
feed licenses-lolcat in bulk
time: [5.1391 ms 5.1548 ms 5.1672 ms]
change: [-19.531% -19.145% -18.763%] (p = 0.00 < 0.05)
Performance has improved.
feed licenses-lolcat in chunks
time: [6.4648 ms 6.4864 ms 6.5072 ms]
change: [-11.768% -11.436% -11.098%] (p = 0.00 < 0.05)
Performance has improved.
Above optimizations made vt.feed_str()
roughly 50% faster for typical output stream (when compared to v0.8.0).
CSI e
(VPR) to move cursor down (like CUD) instead of up (like CUU)BS
(backspace) behavior is now consistent with Xterm, Gnome Terminal, Alacritty and Terminal.appvt.resizable = true
chars()
and text()
to Line
for getting line's textvt.text() -> Vec<String>
method for obtaining terminal text, including all history (scrollback)vt.dump()
when cursor is outside of the scroll region and origin mode is enabled