Skip to content

perf: split TimerWidget static header from dynamic time display - #320

Closed
AroPix wants to merge 1 commit into
lythx:mainfrom
AroPix:perf/timerwidget-static-header
Closed

AroPix wants to merge 1 commit into
lythx:mainfrom
AroPix:perf/timerwidget-static-header

Conversation

@AroPix

@AroPix AroPix commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The TimerWidget's StaticHeader (icon, title, buttons, background) was being rebuilt and re-sent every 300ms during dynamic timer mode, even though only the countdown text changes between ticks.

Split the widget into two manialink layers:

  • Header layer (this.id): rebuilt only on state changes (dynamic toggle, pause/resume, position change, map events)
  • Time layer (this.id + 4): rebuilt every 300ms tick

This eliminates ~75-80% of the per-tick XML payload and avoids redundant StaticHeader.constructXml() + getButtonsXml() string building on every interval fire.

The TimerWidget's StaticHeader (icon, title, buttons, background)
was being rebuilt and re-sent every 300ms during dynamic timer mode,
even though only the countdown text changes between ticks.

Split the widget into two manialink layers:
- Header layer (this.id): rebuilt only on state changes
  (dynamic toggle, pause/resume, position change, map events)
- Time layer (this.id + 4): rebuilt every 300ms tick

This eliminates ~75-80% of the per-tick XML payload and avoids
redundant StaticHeader.constructXml() + getButtonsXml() string
building on every interval fire.
@AroPix AroPix closed this Aug 12, 2026
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.

1 participant