Improve terminal input redraw latency

Keep terminal UI drawing glyphs on WebGL and bypass daemon stream batching for small redraws immediately after terminal input.
This commit is contained in:
Neil
2026-05-19 15:49:35 -07:00
committed by GitHub
parent c856413d23
commit 49b504dc45
6 changed files with 435 additions and 92 deletions
+3
View File
@@ -226,6 +226,7 @@ export class DaemonServer {
// pending data so the final PTY bytes cannot be overtaken under
// stream backpressure.
this.streamDataBatcher.enqueueExit(clientId, p.sessionId, code)
this.streamDataBatcher.clearSessionInput(clientId, p.sessionId)
}
}
})
@@ -239,8 +240,10 @@ export class DaemonServer {
case 'write':
try {
this.streamDataBatcher.markInput(clientId, request.payload.sessionId)
this.host.write(request.payload.sessionId, request.payload.data)
} catch (err) {
this.streamDataBatcher.clearSessionInput(clientId, request.payload.sessionId)
if (err instanceof SessionNotFoundError) {
this.sendExitEvent(client, request.payload.sessionId, -1)
}