mirror of
https://github.com/openai/codex.git
synced 2026-11-13 22:47:20 +00:00
perf(tui): cap redraw scheduling to 60fps (#8499)
Clamp frame draw notifications in the `FrameRequester` scheduler so we don't redraw more frequently than a user can perceive. This applies to both `codex-tui` and `codex-tui2`, and keeps the draw/dispatch loops simple by centralizing the rate limiting in a small helper module. - Add `FrameRateLimiter` (pure, unit-tested) to clamp draw deadlines - Apply the limiter in the scheduler before emitting `TuiEvent::Draw` - Use immediate redraw requests for scroll paths (scheduler now coalesces + clamps) - Add scheduler tests covering immediate/delayed interactions
This commit is contained in:
1 parent
40de81e7af
commit
96a65ff0ed
8 files changed
+344
-10
No files matched your search
@@ -47,6 +47,7 @@ use crate::tui::job_control::SUSPEND_KEY;
|
||||
use crate::tui::job_control::SuspendContext;
|
||||
|
||||
mod alt_screen_nesting;
|
||||
mod frame_rate_limiter;
|
||||
mod frame_requester;
|
||||
#[cfg(unix)]
|
||||
mod job_control;
|
||||
|
||||
Reference in new issue
Block a user