Reduce typing latency caused by POLL_WAIT#846
Conversation
|
PR draft #737 discussed reworking the external printer API. I wonder how is that going? |
Technically not part of the PR, but let me smuggle this in real quick.
|
Nushell doesn't make use of the external printer, so politically it takes precedence in that decision in my view. We should prioritize the battery saving behavior and figure out a solution for a responsive external printer in due course. (as the stalling of #737 shows, probably non trivial refactor needed.) |
This PR aims to be maximally power efficient when the feature |
|
Thanks. Let's move forward with this since it's early in our release cycle. |
This PR makes it so that Reedline no longer wait for
POLL_WAITafter every keystroke. Instead, the delay is only triggered if text pasting or resizing is detected.It also re-introduces a fix from PR #651. That PR was reverted by #840 because of issue #757 about external printers. If the feature
external_printeris not enabled, this PR will just block on input forever for maximum power efficiency. Users withexternal_printerenabled will also see a small improvment in power efficiency, because this PR makes it possible to use a longer polling inteval without affacting typing latency.Fixes #643, #10484, and #521, and hopeful doesn't break #757.