I’ve noticed that Ghost uses a lot of CPU on the client side, and I’m not too sure why. Here’s a screenshot of Ghost (Ghost-CLI version: 1.9.8, Ghost version: 2.9.1, and Casper theme Version 2.8.0) and the subsequent rendering on Safari:
What’s the best way to stop it from invalidating/repainting the page, almost every ms…?
I quickly checked other themes, and this seems to be also present.
On the welcome page (site front end), but not on an article page. The problem is also present on https://blog.ghost.org (80% of 1 out of 4 CPU, also much less than a vanilla Casper theme), so you should give it a try.
Interesting, this appears to be a bug in Safari itself. I can replicate with latest stable Safari but the issue isn’t reproducible when using Safari Technology Preview.
I don’t think there’s much we can do about it other than wait for the next Safari release but by all means open a PR on the Casper repo if you can track down what’s causing it :)
The blog theme’s source is available here https://github.com/TryGhost/Blog. It’s not packaged as a ready-to-use theme as it’s highly tailored to our blog content but you should be able to see how everything is done.
I’m not sure it’s related to JS, the timeline is not showing any JS events which is what suggested to me that it’s a bug internal to Safari. Maybe something to do with a specific combination of CSS, or an event handler that has a bug which causes style invalidation.