Commit bcf2f0c
committed
Disable adaptive read buffering for PTY processes
Large TUI redraws (Claude Code, pi on resize) can emit hundreds of
KB in one write. Before Emacs 31, process-adaptive-read-buffering
defaults to t, throttling the filter to ~40 KB/s for bursty
processes — a 570 KB post-resize frame streams in over ~15 seconds,
making ghostel feel like a slow cascade (issue #85).
Let-bind process-adaptive-read-buffering to nil and raise
read-process-output-max to at least 1 MB around make-process in
both ghostel--spawn-pty and ghostel-compile--spawn. Both values
are captured at make-process time so they must be bound there, not
set afterward. vterm does the same for the same reason.
On Emacs 31+ the first binding is a no-op (default already nil).
The read-process-output-max bump (max of user value, 1 MB) applies
everywhere and collapses a 570 KB frame from ~9 filter calls to 1.1 parent aa4912d commit bcf2f0c
3 files changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2433 | 2433 | | |
2434 | 2434 | | |
2435 | 2435 | | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
2436 | 2446 | | |
2437 | 2447 | | |
2438 | 2448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5176 | 5176 | | |
5177 | 5177 | | |
5178 | 5178 | | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
| 5200 | + | |
| 5201 | + | |
| 5202 | + | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
| 5209 | + | |
| 5210 | + | |
| 5211 | + | |
| 5212 | + | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
| 5217 | + | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + | |
| 5221 | + | |
5179 | 5222 | | |
5180 | 5223 | | |
5181 | 5224 | | |
| |||
0 commit comments