Kirby speed issue (since 2.3 ?)

My website judbd.com with kirby 2.2 was blazing fast. Tonight I updated it to 2.3 and I’ve time to first byte in the 500-3000 ms range, or 3 seconds to display something on the page (server in php 7). Same thing on my local machine (php 5.5), server, and another faster server (php 5.6) (on this server, TTFB is average 300-500ms)

I have tested 2 others 2.3 kirby website on my server, and TTFB are very reasonable, like 40-100ms (sometimes randomly 1000+ms, don’t know why)

Did you know how can I test further to find the issue ? Is this kirby 2.3 ? Is this a combination of kirby 2.3 + my templates/blueprints/whatever (as otherswebsite seem fast) ?

I just changed my blueprints from php to yml in top of 2.3 update but I dont thing it change anything.

My portfolio make a heavy use of the ->thumb() method, maybe the new version have problem with it even once generated and cached ?

A friend of mine tested it a little bit and says that kirby->launch is the longer to load but I don’t know what to do with this information.

If you have any idea of how I can test and speed up the TTFB ? Is anyone experience this ?

Maybe I can try to reinstall it from scratch instead of just update kirby and panel folder ?

That’s strange, I haven’t seen that before. If other sites work on your server, it’s probably a plugin or template that’s causing the issue. Blueprints are only loaded by the Panel, so they shouldn’t be able to cause this.

I’ve had the same issue twice now and just have no clue what went wrong… What fixed it for me was to copy a fresh site folder and then piece by piece put my blueprints templates etc in until I found the origin of the problem. I haven’t found that origin buy the websites are fast again.

I was on my way to rollback to 2.2 and upload it aside the problematic 2.3 + upload a 2.3 version to text it but I think I’m just going to test the fresh install.

Maybe the thumbs cache is problematic ? Except that I can’t see any difference between my different websites.

I’ll let you now the outcome.

OK, here 2 versions of my website:

//update
Here are multiples kirby versions on 2 differents hosters:

http://judbd.com -> reference

http://253f26ccca.url-de-test.ws/kirbyspeedtest/judbd/ -> The site as it is on judbd.com
http://253f26ccca.url-de-test.ws/kirbyspeedtest/230 -> Site on a fresh 2.3.0 install
http://253f26ccca.url-de-test.ws/kirbyspeedtest/223 -> Site on a fresh 2.2.3 install
http://253f26ccca.url-de-test.ws/kirbyspeedtest/222 -> Site on a fresh 2.2.2 install

http://judbd.desav.eu/kirbyspeedtest/judbd -> The site as it is on judbd.com
http://judbd.desav.eu/kirbyspeedtest/230 -> Site on a fresh 2.3.0 install
http://judbd.desav.eu/kirbyspeedtest/223 -> Site on a fresh 2.2.3 install
http://judbd.desav.eu/kirbyspeedtest/222 -> Site on a fresh 2.2.2 install

The only differences are the kirby and panel folder, and blueprints not installed in the 2.2.3 version

Tell me if you feel that one is faster than the other, so we can see if it’s an update issue.

Thank you.

@Thiousi I’ve tested your trick without but it changed nothing :frowning:

Yeah, the Kirby 2.3 version is considerably slower.

I feel that too at the beggining but now it seems more random, though the 2.3 seems to have serious slow bumps sometimes (more than the 2.2 version). I will try with 2.3 fresh install soon.

Seems there is a different size of first background image. One is 1500px width, the other is 1000 px width

Background images are random, also I think that the weight of files are not in question here as the problem seems to be on the GET or Time To First Byte.

I use a lot of ->shuffle() method, maybe the new kirby struggle with it ?

Do you use thumbs for the background images? Are they all pregenerated?

For the hero image on home I don’t use thumb:
<section id="banner" style="background-image:url('<?php echo page('randomitems')->images()->shuffle()->first()->url();?>')">

For project images I use thumbs but I’ve pre-generated them before giving you the links. Some thumbs of random projects have to be generated but some pages with same content (like about, publication, portfolio, side project page) are slow too.

I know that generating thumbs halt the loading, but I don’t think it is since thumbs are already generated for principal pages.

In my opinion / test Kirby 2.3 was slower :slight_smile: …weird, issue - though!

Here are multiples kirby versions on 2 differents hosters:

http://judbd.com -> reference

http://253f26ccca.url-de-test.ws/kirbyspeedtest/judbd/ -> The site as it is on judbd.com
http://253f26ccca.url-de-test.ws/kirbyspeedtest/230 -> Site on a fresh 2.3.0 install
http://253f26ccca.url-de-test.ws/kirbyspeedtest/223 -> Site on a fresh 2.2.3 install
http://253f26ccca.url-de-test.ws/kirbyspeedtest/222 -> Site on a fresh 2.2.2 install

http://judbd.desav.eu/kirbyspeedtest/judbd -> The site as it is on judbd.com
http://judbd.desav.eu/kirbyspeedtest/230 -> Site on a fresh 2.3.0 install
http://judbd.desav.eu/kirbyspeedtest/223 -> Site on a fresh 2.2.3 install
http://judbd.desav.eu/kirbyspeedtest/222 -> Site on a fresh 2.2.2 install

Now I can’t tell if the problem is still here or not (the “judbd” version have to be slower)

I have purged the “thumbs” folder on judbd before uploading thoses tests, maybe that was the issue ?

I’m not entirely sure with that, but didn’t the thumbnail names change with Kirby 2.3? Maybe that was an issue and the thumbnails were created again every time the page loaded?

Indeed the thumbnail names changed with 2.3, so purging the thumb folder definitely is a good step to get a better picture. It looks like in your last test the versions are pretty equally fast. So I’m quite sure it was a thumbnail issue.

1 Like

Yes but if the thumnails are not in use, it’s just useless jpg in folder right ? How it can have impact ?

I will purge the thumbs folder of production server and see.

Thank you!

Purge of thumbnails change nothing, I made a fresh install (kirby 2.3.0 in folder, then copy of my /site /assets and /content) on my production serveur and it seems to work better, as @Thiousi suggested. Not sure if it was kirby or my hoster.

I made a fresh install on my test server and githug confirms files are the same than before, so I don’t know how a “fresh” install could change anything :confused:

I’ll let you know if I encouter others speed issues.

Note : I’m going to erase the tests domains to avoid duplicate content.

Thanks all for your help.

Did you make sure that you don’t have any permissions issues with the thumb folder or the files in it?

1 Like

Yeah the mistery remains here too. The speed issue had transfered to the panel too with the page saving taking virtually forever on the progress bar in the panel but the saving actually happening as fast as usual. I could refresh the front-end and see changes when the pannel was still spinning for minutes…

I really tried to find a replicable issue but haven’t posted here yet as I’m just dumfounded as to how it came about and how I fixed it.

Glad to know you got it all sorted out though !

@bastianallgeier yes, new thumbnails are created fine.