Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clock part periodically triggers large editor repaints #1819

Open
keithclark opened this issue Jan 16, 2020 · 0 comments
Open

Clock part periodically triggers large editor repaints #1819

keithclark opened this issue Jan 16, 2020 · 0 comments

Comments

@keithclark
Copy link
Contributor

keithclark commented Jan 16, 2020

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.

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

No branches or pull requests

1 participant