Commit b5f73b7
committed
🤖 perf: reduce terminal input latency via fire-and-forget IPC
Terminal input was using ipcRenderer.invoke() which waits for a
response before processing the next keystroke. This caused keystroke
reordering under fast typing (e.g., 'ls↵' becoming 'l↵s').
Fix:
- Electron: Use ipcRenderer.send() instead of invoke()
- Browser: Add sendIPCFireAndForget() helper that doesn't await response
- Main process: Use ipcMain.on() instead of handle() for terminal input
The fire-and-forget pattern is appropriate since:
1. Terminal input doesn't return meaningful data
2. Errors are logged server-side but don't need to propagate
3. Order preservation is guaranteed by IPC channel ordering
Fixes: #795
_Generated with `mux`_1 parent 22a816f commit b5f73b7
File tree
4 files changed
+42
-6
lines changed- src
- browser
- cli
- desktop
- node/services
4 files changed
+42
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
| |||
337 | 352 | | |
338 | 353 | | |
339 | 354 | | |
340 | | - | |
341 | | - | |
| 355 | + | |
| 356 | + | |
342 | 357 | | |
343 | 358 | | |
344 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
86 | 105 | | |
87 | 106 | | |
88 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1877 | 1877 | | |
1878 | 1878 | | |
1879 | 1879 | | |
1880 | | - | |
1881 | | - | |
| 1880 | + | |
| 1881 | + | |
1882 | 1882 | | |
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
1886 | | - | |
| 1886 | + | |
1887 | 1887 | | |
1888 | 1888 | | |
1889 | 1889 | | |
| |||
0 commit comments