Memory & Cpu Usage (Client)


#1

Hello Everyone,

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.

thanks!


#2

@Kheo on which page are you seeing this? On your site’s front-end (what your visitors see) or in the admin panel?


#3

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.

I think it’s prevalent on Safari, but couldn’t see the issue on other wb…

Speaking of which, I’d be interested to know how you guys create the categories on https://blog.ghost.org? Would you have a link to share?

thanks!


#4

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 :slight_smile:

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.


#5

if you can track down what’s causing it

I wish I could but my knowledge of JS doesn’t go that far… i’ll give it a shot, just in case.

Thanks for the link!


#6

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.


#7

That’s how bad I am at JS… can’t even figure out when it’s not JS. :cry:


#8

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.