I’ve been browsing through the forums looking for more info on this, but didn’t see anything. I’ve only been working with Grav for a few days now and still learning the ropes. Yesterday I exported my WP blog to Grav and when I copied the 300 posts to my local XAMPP test server everything slowed to a crawl. I deleted a lot of the posts, pulling it down to 90 pages, but when I hit the “next post” button I’m experiencing 25 seconds to 55 seconds for load times. (Before any caching happens, reloads are faster.)
Have I misconfigured something? Could this because my machine is too slow? (My testing PC is a 3.4 GHz, 4 core AMD with 4GB of ram. It’s several years old at this point, but this is the first time I’ve run into any sort of issue like this.)
I’m still not sure if Grav is the right solution for my project, but it’s certainly is one of the better (and easier to use) systems that I’ve come across.
@mrbobdobolibna Something is clearly wrong somewhere. I find Grav to be blazing fast and not demanding of resources.
I do find that MAMP (are you using a similar set up for your PC?) bogs down and almost hangs, on occasion. But that’s MAMP’s fault and I’m too lazy/sysop inexperienced to switch to something else for local development.
@mrbobdobolina Unless you aren’t using any special plugins (slowing down the page generation), you haven’t done anything wrong. Maybe its your harddrive (besides maybe XAMPP), that is your bottleneck here. A SSD may improve your speed, since it can load small files faster than any old-school hard-drive. Since Grav loads all your pages at the first time (when cache is disabled it happens all the time) into the system, before using any pre-compiled configurations or the cache.
@rhukster RE: 4) I’m working with a custom theme that is still a work in progress… I have a single small logic tree checking to see if the post has an image, or if one is declared externally… but currently that is all.
5) I have the blog skeleton installed, but I don’t think I’m calling any of them yet… at least not on purpose.
@bobrockefeller I am using XAMPP on my PC, and that might be the hold up?
@sommerregen I was going to say my PC does have an SSD, but then I remembered that the server data is on a separate drive. I might play around with that, if some of these other things don’t seem to help.
Thanks everyone for the feedback. I’m thinking there must be something with the theme that’s holding everything back… perhaps something in the JS or CSS that’s holding things back… (calling an external source or something.) Glad to know the issue shouldn’t be with the way I configured the site. Thanks again.
Okay, I switched back to Antimatter and the first reload took around 40 seconds, the next couple went quickly, but then it started taking 15 to 20 seconds when I clicked on “next post.”
So, I started tracking the load times with Chrome… I should have done this sooner, but the thing that is taking the most time is just “waiting.” the TTFB is 20 seconds and the rest of the page loads in under 2 seconds… so, not sure what that means, but I at least have a lead now.
If you are using an external or networked drive this could definitely be a problem. Being file based, the speed of the filesystem is vitally important.
I have a similar issue. I use a custom theme, but the blog bits are taken from the default blog theme, unmodified. Site had no issues until I added a few long blog-posts. (Not a lot, only about 6, around 3k words each) Now, depending on the length of each post, load times can be up to 60 seconds. Once loaded, rendering happens in an instant, the bottleneck is the initial GET request to (waiting for localhost). This only happens on individual blog entries (all other pages are blazing fast), and the longer the particular post is, the more time it waits before even loading, which is weird.
I don’t see how pulling in 25kb of data could be a disk issue either, but maybe I’m missing something there?
BTW localhost Ubnuntu 14.04 running the latest XAMPP. Not yet tried online.
What about images? If you are doing media operations on images, this can cause an initial slow down, 60 seconds seems excessive, but perhaps you have a lot of large images?
Not really. It has a single image, which is a line drawing, about 15kb in size. The thing is, the slow-down seems to depend on word count. Under 2k words it’s usually less than 30 sec, over 3000 it can be over 60. Plain weird. (Disk is virtual (vdi), usually fast as anything (OS boots in 2 seconds.))
Anyway, I tried switching themes and the problem goes away. Probably too many twigs there and things start to become bushy? (although I would expect that to affect the rendering more than loading, but again, I might be wrong.)
Which theme were you using? and which one did you switch to? Also what page was this on? If we know the template used, perhaps we can track down what in the theme was making things slow.
rhuk: I modified the twenty theme to have a blog thing going. i took some twig-bits from the default blog theme form the website (I’ll look up the name in a moment). I did not modify much in the twigs, only altered small things (placement of featured image, etc.), but I could not tell you what i did precisely, it was two months ago, I only got back to working on it now…
When I switch to the original blog theme (or in fact load the same posts form a fresh install of that), load times are fine.
Just noticed though that it caches properly. Cached pages load fine. When a page is cached, and I add a large amount (40+) images, and refresh, it loads the new images instantly, even with cropResize. Seems like the problem is with caching text.
flavi: OK I see. But this much? It seems excessive (last one which was 5k+ words needed to raise max_execution_time to 120 seconds for it to load. That is overkill under any circumstances. See the remark about caching above, once the same post was cached, and 4 images applied, the new images were rendered in milliseconds (OK not really, but less than 1sec).
Anyway, i will see what it does on the live server, this is still only localhost in a VM. (Yet I would expect things to go smoother, it’s got quite a bit of juice for such a small site).
Meantime I played around with XAMPP, disabled iPv6, did everything others suggested that could hog the localhost lookup, but no good (and localhost lookup did not seem to be an issue on other pages either).
Thanks for your effort guys, really appreciate it!