Commit Graph

2 Commits

Author SHA1 Message Date
Joe Wilm ae39d38a15 Improve pty reading and renderer synchronization
The pty read thread now runs the parser and directly updates the
terminal in the same thread. This obviates the need for a channel which
sends every char read from the pty; this is a huge performance boon.

Synchronization between the updater and the renderer is now achieved
with a PriorityMutex. Previously, an atomic bool was (poorly) used to
request the lock on terminal. The PriorityMutex is dead simple to use,
and it _Just Works_.
2016-07-01 10:34:08 -07:00
Joe Wilm d514b38223 Vendor upcoming Utf8Chars iterator from libstd
The upcoming Utf8Chars iterator was vendored from a libstd PR. The
iterator works on BufRead types which is critical for improving
performance. A small modification was made where the number of unused
bytes is included with Utf8CharsError::IncompleteUtf8.

The pty reader thread was updated to use this new type. Next steps will
be moving the parsing there and either sending parse results in batches
or updating the terminal directly from that thread.
2016-06-30 21:26:26 -07:00