i’m building a website for a client and it renders really slow. It actually differs from 600ms to 2.45 seconds. Am i the only one experiencing this issue? Any idea’s on how to fix that? It’s a pretty lightweight site with just some text and pictures. Have a look at sharda-jainandunsing.nl.
Hi flaviocopes,
As far as i can see, i turned on every option for caching. It’s set for “auto”. I did not change anything in the default settings actually.
If you are seeing widely varying performance then the most likely culprit is your web server. I’m assuming this is a hosted setup, probably shared hosting.
Shared hosting means you share the server resources with potentially 100s of other users. The performance you get is going to be dependent on the load of the machine at any given time based on what’s going on with those other users sites. Of course this means your performance is going to vary wildly.
A better solution is to use a hosting provider that has better hardware, or less users-per-server like Rochen. Alternatively you could look at a VPS solution like DigitalOcean or Linode.
hi rhukster,
Thanks for your reply. I’m hosting it on a shared hosting indeed, but before that i developed on a dedicated server which wasn’t any faster than on the shared hosting. On the same shared hosting i ran Wordpress which ran like a charm.
Well, generally speaking Grav should run very fast. You need to ensure you are running an up to date version of PHP. 5.4 works, but 5.5 is better, and 5.6 is even better than that.
Also because Grav is file-based, a modern and fast filesystem is important too. I know that some hosting providers with grid-based-filesystems such as MediaTemple don’t work well with Grav.
Just a note, that even on bog-standard cheapo hosting it should run pretty well, but a modern SSD-based RAID file system will ensure it flies! You can check our hosting section in the docs for recommendations.
One other thing. The actual site you developed could also impact performance. If you are doing lots of logic in Twig, or doing logic that is not cached, this can negatively effect performance.
If you would like me to test performance, you can zip up your entire site and send me a link to download it. I can then run it locally and let you know how it runs for me.
FYI, blog-s keleton usually runs in about 30ms (as reported by Grav debugger bar) for me, and the base one-page Grav runs in about 15ms.