Skip to content

Establish a paint-only frame budget for thinking spinners and future effects #64

Open

Description

@trissim

Goal

Thinking/activity animation must remain smooth while typing, switching tabs, resizing, and changing transcript filters. Establish a paint-only animation path suitable for future visual effects, rather than adding effects on top of long UI-thread stalls.

Budget and invariants

  • Target a 16.7 ms steady-state frame-work budget for 60 Hz. The current throbber cadence is 30 Hz; a paint budget measurement is not proof of delivered terminal FPS.
  • Spinner ticks must not trigger transcript layout, CSS recascade, registry/file reads, or new worker/service construction.
  • Reuse prepared color/segment data; bound per-frame allocation and invalidated regions.
  • Hidden/inactive spinners should not spend the current view's frame budget.
  • Slow filtering/loading may show a spinner, but must not block input or animation.
  • Measure UI-thread work, queue/input latency, terminal flush, and dropped/late frames independently.

Existing progress

Paint-only one-cell activity labels, cached throbber color tables, and native-segment parity pilots already exist. The current performance branch is fixing retention and broad filter invalidation. The full animation budget under captured real-use load remains unverified.

Related: OpenHCSDev/textual#4, #59, #60, #61, #62.

Activity

  1. trissim commented on Sep 26, 2026

    @trissim
    Author

    Draft PR #65 includes tools/performance/benchmark_spinner.py and existing spinner cache/parity coverage. A minimal 306x80 headless probe requested 60 Hz: 180 updates/3 s, compositor p95 1.14 ms/max 2.23 ms, zero layout/CSS-apply calls. This establishes small-scene component cost only; delivered terminal FPS and the loaded-app budget remain open.

  2. added 5 commits that reference this issue on Oct 16, 2026
  3. trissim commented on Oct 17, 2026

    @trissim
    Author

    Measured 2026-10-17 in the real app (isolated Xvfb, copied root, Toad main after P281): 10 s of a thinking spinner with no input gave 200 animation-clock ticks, 0 layout passes (no Screen._layout_steps, no Widget.refresh(layout=True) callers), 214 paint refreshes, tick median 0.30 ms, max 1.92 ms. The spinner does not trigger transcript layout. Still not measured: animation smoothness under typing, tab switches and resize load.

  4. added 2 commits that reference this issue on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions