Skip Navigation

[Resolved] Data Filter is take time

This support ticket is created 3 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Nigel 3 years, 6 months ago.

Assigned support staff: Nigel.

Author
Posts
#1244983
Search functionality.jpg

I am doing search functionality using drop-down with search button. When i select option from choose a category, its related data show in next drop-down choose your location but its take 2 or 3 second and reflect on next drop-down. How can i make it smooth without any problem.

I follow one document but not remember right now.

I setup this search functionality on home page : hidden link

#1244998

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Holly

Could you please add your debug info?

hidden link

#1245002

Above is my debug info

#1245014

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks Holly

Your server settings all look good and don't explain the slow response time. (When you change the first dropdown an ajax request is submitted to the server and Views performs a query to update the results as well as the options which should be included in dropdowns, and checking the network request with the browser tools showed this taking about 4 seconds, which is longer than expected.)

Can we try this again with the non-Toolset plugins disabled and switching to twentynineteen theme?

If you let me know when you've done that I can inspect the request again in the browser dev tools.

#1245036

As per your guideline, i change the theme from Ultimatum to Twenty Nineteen and inactive non-Toolset plugin. But same thing is happen. Please check the website link : hidden link

#1245038

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I can see that it is slightly quicker, but not much.

The next thing I would like to try is making a copy of your site and installing it on another server to compare, if that's okay.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes other than to temporarily add a backup plugin to take a snapshot of the site.

#1245091

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I notice that you have a large site with nearly 14 thousand vendor posts.

Your search View contains two filters, one for a taxonomy ("Supplier of vendors") and another for a custom field ("County").

Querying posts by custom fields is very inefficient compared to querying by taxonomy.

Debugging the ajax queries is not so easy, but I made a simple comparison with two new simple Views.

One queries vendors with a filter for a particular term from the taxonomy.

The second is essentially the same but queries for the county custom field instead.

The page load time for the first View was 0.89s, while the same for the second View with custom field was 3.33s, significantly higher.

The difference is not so apparent on small sites, but can be significant on larger sites such as yours.

So the solution is to avoid using custom fields where these will be used in queries. (See this article, for example.)

I recommend you replace your County custom field with a county taxonomy.

#1245575

I can't find any link for article in previous message. Please, Can you send me again?

#1245610

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, here was the article I was linking to: hidden link