Skip to content

fix(tui): rate limit frame capture to max 1 frame per second#297

Merged
echobt merged 1 commit intomasterfrom
feat/rate-limit-tui-frame-capture
Jan 27, 2026
Merged

fix(tui): rate limit frame capture to max 1 frame per second#297
echobt merged 1 commit intomasterfrom
feat/rate-limit-tui-frame-capture

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 27, 2026

Summary

When CORTEX_TUI_CAPTURE_ALL is enabled, frames were being captured on every render, which is excessive and generates too many debug logs (e.g., frame 10172, 10173, 10174... all within the same second).

Changes

  • Added rate limiting to the frame capture system
  • When capture_all mode is enabled, frames are now captured at most once per second
  • Added last_capture_time field to track when the last frame was captured
  • Uses std::time::Instant for precise timing

Impact

  • Significantly reduces log noise and storage overhead
  • Maintains useful debugging information for TUI state analysis
  • No change to behavior when specific events trigger captures (key presses, commands, etc.)

When CORTEX_TUI_CAPTURE_ALL is enabled, frames were being captured
on every render, which is excessive and generates too many debug logs.

This change adds rate limiting so that in capture_all mode, frames are
only captured at most once per second. This significantly reduces log
noise and storage overhead while still providing useful debugging
information.
@echobt echobt merged commit c6b086f into master Jan 27, 2026
2 of 3 checks passed
@echobt echobt deleted the feat/rate-limit-tui-frame-capture branch January 27, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants