Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-01-13 02:36:14

Kubicixfactor
Member
From: Shropshire, UK
Registered: 2015-08-19
Posts: 74

Site home page slow loading

First of all many thanks to Ben for helping me with some problems while I moved my CE4 site across to Backlight. I've been putting off upgrading for ages so thanks very much for being so responsive!

I've noticed that the site stiil loads quite slowly compared to CE4 though - the old CE4 site loaded the home page in under 2 seconds. The site now takes around 4 - 5 seconds to load. It contains 31 album sets and 203 albums (a little less than the old CE4 site). PHP version is 7.3 (speed is no different if down versioned). The google speed index is coming back with a score of 60.

I'm assuming that the answer is going to be "hosting". If that's the case could anyone point me towards what I should be asking my hosting company (namesco, in the UK) to look for please?

Offline

#2 2020-01-13 11:06:49

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Site home page slow loading

No worries, I've been glad to have been able to help.  The embedded album on your home page is causing it to load slowly.  In particular, it seems to be doing three times the work of what it should be doing, by running six queries on the Publisher database instead of the two you'd have for non-embedded albums. The potentially-duplicate queries have a compounding effect on the loading time, since your database is quite large.  The size in itself isn't a problem, but when multiplying the queries by three, then it does affect loading time.
I'll need to delve into the code to see whether there's a reason for the multiple queries and whether it can be optimised.

Offline

#3 2020-01-13 17:50:48

Kubicixfactor
Member
From: Shropshire, UK
Registered: 2015-08-19
Posts: 74

Re: Site home page slow loading

Thanks Ben, that's interesting, hope there's something that can be optimised. The upgrade overall has been really worthwhile and it's so much better than CE4!

I've just replaced the home page gallery with smaller renditions of the images (that hasn't helped though). Let me know if there's anything else I need to do at my end. if you need to FTP onto the site all the credentials I've emailed previously will work.

Offline

#4 2020-01-13 22:21:48

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Site home page slow loading

I've spent some time looking into this.  I can see where the three calls are being made, but haven't yet been able to untangle the dependencies between them.  I've made a couple of changes that have reduced it to two calls, so your page should load faster now.  I'll need to work further on this to get it down to one.

Please let me know if you find anything amiss with the changes I've made.

Offline

#5 2020-01-13 23:04:00

Kubicixfactor
Member
From: Shropshire, UK
Registered: 2015-08-19
Posts: 74

Re: Site home page slow loading

Thanks a lot for looking at this Ben, I've checked it over and it's all looking ok with no errors at the moment. Google pagespeed is still rating the site as quite slow though (score of 62).

Offline

#6 2020-01-14 18:24:38

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Site home page slow loading

I've found how to prevent the extra database query and have now optimised the code to only have one publisher database query for embedded albums.  As it was, embedded Galleria and Theater albums were calling the Publisher database three times.  Embedded Pangolin albums were calling it twice.  It's down to one call for all types.
This will be added to the released code after further testing for other side-effects.

Offline

#7 2020-01-15 19:50:34

Kubicixfactor
Member
From: Shropshire, UK
Registered: 2015-08-19
Posts: 74

Re: Site home page slow loading

All looking good now Ben and page load speed is a lot better! Thank you! smile

Offline

Board footer

Powered by FluxBB