Skip Navigation

[Resolved] Slider caching failing – loads every page

This thread is resolved. Here is a description of the problem and solution.

Problem: I am experiencing slow page load times, and it appears that slider caching is not working. When I reload the page, the slider loads the content again.

Solution: Slider caching doesn't hold on to content across page reloads, it holds on to content as the Slider paginates in a loop. You can improve the performance of this page by reducing the number of pages cached in each View, reducing the number of Views with automatic pagination, and upgrading to PHP 7. If any individual database queries take longer than 0.5ms, we can investigate those queries in more detail.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 2 voices.

Last updated by matijaK 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#916221
Capture2.PNG
Capture.PNG

On my dev site hidden link I have two sliders,
one displaying logos of reference companies we work with and one with user opinions.

They both have the settings for caching pages turned on (see screenshot), but everytime I reload the page, the sliders take forever to move between pages.

Is it something to do with WP Super cache that I'm using for caching on the site?

#916299

It could be related, yes. Sometimes calls to admin-ajax.php can be negatively impacted by caching systems. The easiest way to test that is to temporarily deactivate the caching plugin and reload the page a few times. Please try that and let me know the results.

#916478

Hi Christian,

I tried turning off caching as well as deactivating the WP super cache plugin.
Unfortunatelly the problem persists.

I'm having issues with my toolset view always loading very slowly on this site. Enabling the WP Super Cache improves the speed, but there are times when loading a view is still very very slow. Compared to some parts of the site, where there isn't a view included, where the load time is fine, the load speed is definitely affected where a view is loading posts.
Do you have any idea if it might be some of the settings in toolset affecting this?

#916515

The mistery continues!

Apparently it takes some time after the page loads, for the sliders cache to build/slides to load.
Meaning: if I load the page and start scrolling the slider too soon, it blocks. If I load the page and wait a few minutes, the slider works fine. This seems sort of counter intuitive as I would imagine the cache of the slider to be ready on load. Or?

#917498
Screen Shot 2018-06-25 at 9.31.07 AM.png

Compared to some parts of the site, where there isn't a view included, where the load time is fine, the load speed is definitely affected where a view is loading posts.
Views will have some impact on load speed, this is expected because more code must be executed and more content must be loaded. If any single database query is taking longer than .5ms, we can investigate that in more detail.

This seems sort of counter intuitive as I would imagine the cache of the slider to be ready on load. Or?
The caches are built up with AJAX requests, not on page load. The main problem I see here is that simultaneous AJAX requests seem to slow down your site. You can see in the attached screenshot that these AJAX requests take up to 20 seconds to complete when several of them happen together. On my local copy of your site, this number is much lower because I have deactivated all plugins except Toolset. I would like to try a test on your development server. Please temporarily deactivate all plugins except Types and Views, then open the browser's Network panel and test the homepage again. After about 30 seconds please take a screenshot and post here for me to review.

#918191
Capture3.PNG

Hi Christian,

thanks for looking into this.
I disabled all plugins, except Views and Types. This effectively renders my site useless as I rely on many of those plugins to deliver certain functionalities.
Please find attached the screenshot of the Network tab from chrome developer tools. The loads speed is indeed better - but what to do with missing functionalities from other plugins?

You can check the current state of the load speed on the dev server yourself: dev2.jezikovna-akademija.si (with all plugins except views and types disabled).

edit: I just checked again: loaded the front page on incognito window (no cache) and the load speed of the sliders is still poor.

#918342
Screen Shot 2018-06-27 at 8.54.17 AM.png

Some of this is just because it's a slow server, especially when multiple requests are being triggered at the same time. You can see in this waterfall it takes 2 seconds to download a static 1.2KB text file. Is this development environment a good indication of your production environment?

#918357

Hi Christian,

thanks for your reply. Unfortunately, yes - this is the same shared host as we will be using for the live version.
I know it's not really super flying but I'm not sure a different server will drastically improve the situation.

Please note I've also tried:
- using the default theme and disabling all plugins (but keeping all the same content) -> speed was brilliant
- using the DIVI child theme I have and disabling all Toolset plugins but keeping all the rest on -> speed was good enough

You've also asked previously if any query takes a long time - using the course browser (CTA on top of the front page) takes a lot of time if the cache (Super Cache plugin) is not yet built.

#918437
Screen Shot 2018-06-27 at 11.50.41 AM.png

I'm not sure a different server will drastically improve the situation.
Sure it can, that's one reason why it performs much faster on my local environment. For one thing, I'm running PHP 7, which has many performance improvements over PHP 5. It also takes less time to download files and less time to return AJAX responses. If you're not able to change servers, then we need to think of some alternatives to speed things up. Caching plugins will not help these AJAX response times. Instead, you can consider preloading fewer pages in each View, and consider removing automatic pagination for some Views on the page. This will lower the number of AJAX requests happening just after the page loads, which will help performance.

- using the DIVI child theme I have and disabling all Toolset plugins but keeping all the rest on -> speed was good enough
Without Toolset plugins these Views do not exist, so the site loads fewer asset files and makes fewer AJAX calls. I don't think this comparison is very helpful because it's not an accurate representation of the site without Toolset.

You've also asked previously if any query takes a long time - using the course browser (CTA on top of the front page)
I'm not asking about a page load request, I'm asking about an individual database query. A page load request will include multiple database queries. You can inspect individual queries using a plugin like Query Monitor.

#958738

Hi Christian,

thanks again for your help. You were, of course, correct: upon migrating this WP site to a VPS on Google cloud console (nginx and php7) it works like a charm. Reducing the number of ajax calls of course helped a lot with that.

Thanks!