Skip to content

Clock part periodically triggers large editor repaints #1819

@keithclark

Description

@keithclark

When adding a clock part to a creation the preview stutters once a second. This is really apparent on lower-end hardware, like the PI3 Kits. Adding another clock makes the problem worse.

Devtools shows the clock part is triggering a complete repaint of the block editor whenever the inline <kc-clock-display> component updates (see the gif below. I wish GitHub would let me upload videos!). Profiling this on the PI3 kit points to these repaint as the cause of the stuttering.

paint-flash

To prove this I added position: absolute to the <kc-part-item-list> elements to prevent them from triggering reflows (and also breaks UI layout). This limits repaints to the correct areas and the PI happily ticks away at a constant frame rate...

paint-flash-fix

This paint flashing also happens briefly when switching to the part rename control, so this may not be limited to the clock part.

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