Animation-only frames repaint the whole window
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- frontend, performance
Research direction
Start with the linked change in krazyjakee/blitz commit 959fc445, then read the anyrender damage API issue #149 and Stylo stepped animations issue #517. The issue names BaseDocument::paint_damage, blitz_paint::paint_scene_damaged, and next_animation_change as relevant entry points. Done means animation-only frames repaint only the previous and current animation damage, unchanged frames are skipped, paused animations are not restyled, and other frame causes still repaint everything.
Written by the indexing model from the issue text.
Description
Every frame caused only by a running animation repaints the whole window. A small status spinner at 60 Hz then costs about as much as a full-window redraw on every frame: in our measurements nearly half a core on a desktop GPU with vello_hybrid, and far more with a CPU renderer. #1309 covers the related pacing problem, and #1197 lists the same full repaint for wheel scrolling.
A change we carry, in case it's useful as a starting point: https://github.com/krazyjakee/blitz/commit/959fc445. It needs a damage API in anyrender (DioxusLabs/anyrender#149) and a Stylo hook for stepped animations (servo/stylo#517).
- A frame whose only cause is an animation tick repaints only the union of where the animating elements painted before and where they paint now.
BaseDocument::paint_damageandblitz_paint::paint_scene_damagedclip the scene to it. - Frames with no visible change are skipped.
- Paused animations are no longer restyled.
steps()animations sleep until their next step (next_animation_change).- Any other cause of a frame still repaints everything, so it fails safe.
Measured on a 1440×900 window, a continuously turning status-bar spinner went from 46.9% to 8.2% of a core, and an 8-step one to 1.85%.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 281
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 184
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DioxusLabs/blitz
-
<input type="number"> misses text-entry leaf sizing in layoutPossibly taken @GoCoder7 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DioxusLabs/blitz#1675 ·
Maintainers usually reply within 1 day
-
Copy, cut and paste shortcuts don't work with Caps Lock or ShiftPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events C-Bug
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DioxusLabs/blitz#1507 ·
Maintainers usually reply within 1 day
-
Copy and cut work in password inputsPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events A-Forms C-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DioxusLabs/blitz#1501 ·
Maintainers usually reply within 1 day
-
Panic on live viewport resize when unstyled elements exist in display: none subtreePossibly taken @GoCoder7 claimed this 9 days ago. OpenA-Layout A-Style C-Bug I-Crash
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DioxusLabs/blitz#1488 ·
Maintainers usually reply within 1 day
-
Right-button drag starts a text-selection drag and suppresses `contextmenu`Possibly taken @staging-devin-ai-integration claimed this 24 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
DioxusLabs/blitz#1184 ·
Maintainers usually reply within 1 day
All issues in DioxusLabs/blitz
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pbakaus/impeccable#1601 ·
Maintainers usually reply within 1 day
-
RDF/XML writer: a blank node in two lists is left out of the secondPossibly taken @mrnolte claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
phillord/horned-owl#368 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mongodb/kingfisher#588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug rust
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days