Commit 309332a
patch 9.2.0274: BSU/ESU are output directly to the terminal
Problem: BSU/ESU are output directly to the terminal
Solution: Route them through out_buf() and flush the output directly,
increase the OUT_SIZE terminal buffer (Yasuhiro Matsumoto)
Route synchronized-output control sequences through out_buf and flush
explicitly at protocol boundaries, instead of forcing BSU/ESU through
ui_write() directly.
Also increase the terminal output buffer from 2047 to 8191 bytes so
large redraws are emitted in fewer writes.
The important guarantee here is terminal-visible ordering: BSU must
reach the terminal before the batched redraw bytes, ESU must reach the
terminal after them, and FLUSH must emit ESU and BSU together, then
flush immediately.
Benchmark: PTY redraw workload with TERM=xterm-256color, long wrapped
lines, cursorline, listchars, horizontal scrolling, and repeated redraw!.
write syscalls: 8514 -> 5094 (-40.2%)
wall time: 0.568s -> 0.495s (-12.9%) on valid runs in this environment
closes: #19862
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>1 parent ac18dff commit 309332a
2 files changed
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2807 | 2807 | | |
2808 | 2808 | | |
2809 | 2809 | | |
2810 | | - | |
| 2810 | + | |
2811 | 2811 | | |
2812 | 2812 | | |
2813 | 2813 | | |
| |||
8059 | 8059 | | |
8060 | 8060 | | |
8061 | 8061 | | |
| 8062 | + | |
| 8063 | + | |
| 8064 | + | |
| 8065 | + | |
| 8066 | + | |
| 8067 | + | |
| 8068 | + | |
| 8069 | + | |
8062 | 8070 | | |
8063 | 8071 | | |
8064 | 8072 | | |
8065 | 8073 | | |
8066 | 8074 | | |
8067 | | - | |
8068 | 8075 | | |
8069 | 8076 | | |
8070 | 8077 | | |
| |||
8075 | 8082 | | |
8076 | 8083 | | |
8077 | 8084 | | |
8078 | | - | |
| 8085 | + | |
8079 | 8086 | | |
8080 | 8087 | | |
8081 | 8088 | | |
8082 | | - | |
8083 | | - | |
| 8089 | + | |
| 8090 | + | |
| 8091 | + | |
8084 | 8092 | | |
8085 | 8093 | | |
8086 | 8094 | | |
| |||
8090 | 8098 | | |
8091 | 8099 | | |
8092 | 8100 | | |
8093 | | - | |
| 8101 | + | |
| 8102 | + | |
8094 | 8103 | | |
8095 | 8104 | | |
8096 | 8105 | | |
| |||
8105 | 8114 | | |
8106 | 8115 | | |
8107 | 8116 | | |
8108 | | - | |
| 8117 | + | |
8109 | 8118 | | |
8110 | 8119 | | |
8111 | 8120 | | |
| |||
8115 | 8124 | | |
8116 | 8125 | | |
8117 | 8126 | | |
| 8127 | + | |
8118 | 8128 | | |
8119 | | - | |
8120 | 8129 | | |
8121 | 8130 | | |
8122 | 8131 | | |
8123 | 8132 | | |
8124 | 8133 | | |
8125 | 8134 | | |
8126 | | - | |
8127 | | - | |
8128 | | - | |
8129 | 8135 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| 737 | + | |
| 738 | + | |
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
| |||
0 commit comments