Skip to content

Stop redrawing the window at the live rate when nothing moves - #17

Merged
Adiakys merged 1 commit into
mainfrom
fix/idle-gpu-usage
Nov 3, 2026
Merged

Adiakys merged 1 commit into
mainfrom
fix/idle-gpu-usage

Conversation

@Adiakys

@Adiakys Adiakys commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

With the window still, SimRig redrew at about 36 fps and kept the integrated GPU busy.

Live inputs arrive at 60 Hz and each card is rebuilt and written back when it changed. The comparison always failed: Slint never finds two empty images equal, and every card carries at least one (picture, gate or frame), so every card was rewritten on every live frame. The Inputs view had the same issue, with new lists each time rebuilding the whole view.

  • same_card compares cards treating empty images as equal, used by the home cards and the open component.
  • same_view compares the Inputs view by the contents of its lists.

Measured on a real rig (CSL DD, wheel, pedals, shifter, handbrake) on the home: from ~36 fps to 0 with nothing moving, and 5 card updates in 30 s instead of thousands.

The press badge on the steering wheel card faded with an animation bound to the whole device: every live frame started it again, which drew one more frame, so a moving wheel redrew at twice the live rate (120 fps). It now follows a property set only when the badge shows or hides. With the simulated rig moving: 60 fps, GPU from 14.5% to 7%.

@Adiakys
Adiakys merged commit e5cd23a into main Nov 3, 2026
2 checks passed
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