Commit 3cfa4bc
authored
perf(tui2): reduce unnecessary redraws (#8681)
This reduces unnecessary frame scheduling in codex-tui2.
Changes:
- Gate redraw scheduling for streaming deltas when nothing visible
changes.
- Avoid a redraw feedback loop from footer transcript UI state updates.
Why:
- Streaming deltas can arrive at very high frequency; redrawing on every
delta can drive a near-constant render loop.
- BottomPane was requesting another frame after every Draw even when the
derived transcript UI state was unchanged.
Testing:
- cargo test -p codex-tui2
Manual sampling:
- sample "$(pgrep -n codex-tui2)" 3 -file
/tmp/tui2.idle.after.sample.txt
- sample "$(pgrep -n codex-tui2)" 3 -file
/tmp/tui2.streaming.after.sample.txt1 parent ab75338 commit 3cfa4bc
File tree
3 files changed
+20
-4
lines changed- codex-rs/tui2/src
- bottom_pane
3 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1577 | 1577 | | |
1578 | 1578 | | |
1579 | 1579 | | |
1580 | | - | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1581 | 1589 | | |
1582 | 1590 | | |
1583 | 1591 | | |
1584 | 1592 | | |
| 1593 | + | |
1585 | 1594 | | |
1586 | 1595 | | |
1587 | 1596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
| 971 | + | |
971 | 972 | | |
972 | 973 | | |
973 | 974 | | |
| |||
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
| 1013 | + | |
1012 | 1014 | | |
1013 | 1015 | | |
1014 | 1016 | | |
| |||
1019 | 1021 | | |
1020 | 1022 | | |
1021 | 1023 | | |
| 1024 | + | |
1022 | 1025 | | |
1023 | 1026 | | |
1024 | 1027 | | |
| |||
1029 | 1032 | | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1033 | 1038 | | |
1034 | 1039 | | |
1035 | 1040 | | |
| |||
0 commit comments