What caused [Violation] Forced reflow while executing JavaScript took xxx ms?

Hello,

Here is a Hype document, and it sometimes show:

[Violation] Forced reflow while executing JavaScript took xxx ms in Chrome Console as the screenshot below if refresh the page:

Here is the Hype document :

document.hype.zip (25.0 KB)

Thanks

I do not get that with you doc. And it seems are not using any JS anyway apart from the hype runtime or unless you are seeing this when it is embedded in you wordpress site, which would be running JS.

But even if you were it seems that this warning is more to help you speed code rather than any actual errors.

Always good to google first when you get odd console errors like this.

I recommend changing the logging from “all levels” to uncheck the “verbose.” These violations are typically just performance suggestions and unless you are fighting for every last juice of scroll/resize performance can be safely ignored.

@MarkHunte @jonathan,

Thanks for suggestions.

Just for your information. Actually, it happens on local preview not in wordpress, and it is could be reproduced every time for me, and it seems related to google font referenced, and it will disappear if no google fonts referenced, and I just suppose it is related to google font load time with varied google font CDN performance.

Thanks

1 Like