Skip Navigation

[Resolved] Displaying a view really slow

This support ticket is created 2 years, 7 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by camila 2 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2159955

Hello, a month ago one of your support agents help me with the following: https://toolset.com/forums/topic/displaying-a-view/, but we have noticed that the page loads really slow, can you someone help to make this page faster.
thanks

#2160607

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting Toolset support.

From what I can gather so far, you are nesting 4 levels of views, this will for sure generate more loads on the application level(WordPress). To make it run quicker, you will need to optimize on one or several levels. At least, the server resources(CPU, Memory) and the application level.

Optimizing the application level depends very much on the data model. I understood the relationships, but I still do not know how the "Featured and Members Only" is stored? Is it stored in a custom field?

Using a caching plugin will definitely help to boost the speed of the page. We, at toolset.com, are using WP Rocket plugin, which is a premium plugin. There are also other free plugins out there that could help.

If you are comfortable with programming you might want to build your own solution for this specific page. Let me know if you want some suggestions for it.

#2162149

Hi Jamal, thanks for your answer.
We are using the Ultimate Member plugin for the "Featured and Members Only" so basically if [wpv-conditional if="( $(um_content_restriction) eq '1' )"] show else not.
So from what I can understand will need to add a caching plugin as soon as we are done?
thanks

#2162213

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Actually, I don't think, the condition on the custom field from "Featured and Members Only", that's causing the slowness. It is rather the many levels of nested views. Each view will execute a WP_Query instance, which will execute an SQL query to the database level. Plus an SQL query from Toolset to find the related posts. At least two queries to the database.

So, the first view will execute two queries. Let's say it will return 5 geolocation.
The nested view will execute two queries for each geolocation. This will give 10 queries. Let's say they will give us 15 counties.
The nested view for municipalities will execute two queries for each county. Which will results in 30 queries.
This will result in at least 45 queries to the database.
And that is what is really causing the slowness.

A caching plugin will definitely make things faster. Caching can be implemented on several layers. These two articles seem to explain it better:
- hidden link
- hidden link

Personally, I would use a plugin that offers caching at the page level. This way the whole page with all the views will be cached. And when you update something with the tax sales and you need the page to update, just purge the page and run it once and it will be cached. Does it make sense?

This being said, I'll let you check what option will help the most. And let us know what you will do.

#2168001

Thanks, we will try with some caching plugins then.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.