Wez Furlong edee1335c1 mux: remove parsing bottleneck
Test scenario is `cat`ing the public domain wiki text data from
http://cs.fit.edu/~mmahoney/compression/enwik8.zip in the terminal;
that file is 96M in size.

`time cat ~/Downloads/enwik8.wiki`

Prior to this change, depending on the OS, the time to cat the file
could be several minutes.

Digging in, the bottleneck appears to be that there isn't sufficient
parallelism between the reader and the parser, which means that the
rate of reading data is constrained by how long it takes to parse
and render a frame.

This commit switches away from using a synchronized vecdeque to
effectively create a non-blocking pipe, to "simply" using a socketpair
with a larger buffer size.

We now do blocking pty read -> write to socketpair in the reader
thread, and then read socketpair -> parse in the other.

The key difference between before and after being that the pty read
can continue to read and accumulate data (with an upper bound, so
that CTRL-C is still responsive) while we're parsing and rendering
a frame.

This increases the throughput for this scenario, bringing it down
from ~3:30 to ~17 seconds on this Ryzen 2700X system.

refs: https://github.com/wez/wezterm/issues/927
2021-07-11 08:26:35 -07:00
2021-05-30 23:07:29 -07:00
2021-06-27 09:57:56 -07:00
2019-06-08 21:28:11 -07:00
2021-03-26 09:01:54 -07:00
2021-05-30 23:07:29 -07:00
2021-05-22 16:20:35 -07:00
2021-07-10 22:04:43 -07:00
2021-05-09 10:59:48 -07:00
2021-05-23 14:42:41 -07:00
2021-07-11 08:26:35 -07:00
2020-12-29 09:24:34 -08:00
2021-05-28 15:11:29 -07:00
2020-10-03 11:15:57 -07:00
2021-04-14 13:04:23 -07:00
2021-07-10 17:52:14 -07:00
2021-07-10 22:04:43 -07:00
2021-07-10 19:01:20 -07:00
2021-02-03 21:56:30 -08:00
2021-05-19 19:08:57 -07:00
2021-03-20 20:14:17 -07:00
2019-03-22 20:41:50 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation.html

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

  • You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
  • Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
  • There is a Matrix room via Element.io for (potentially!) real time discussions.

The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.

S
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
Readme MIT
316 MiB
0 Stars 2 Watchers 0 Forks
Languages
Rust 97.7%
Python 1%
Shell 0.9%
Nix 0.2%