Skip Navigation

[Resolved] custom search: clicked input show too slowly

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: Asia/Karachi (GMT+05:00)

This topic contains 10 replies, has 2 voices.

Last updated by Waqar 1 year, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2425295

a.R

This search finally works quite well now: hidden link

But after changing a search criteria, "Profi-Suche" on the left side (e.g. after deactivating Ethik/Religion) the deactivation will only be displayed after search results update.
As a user I wonder all the time if I have clicked a criteria or not. Users will be unsettled. And annoyed.

How change that?

THANK YOU 🙂

#2426051

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

spinner-insert-example.png

Hi,

Thank you for contacting us and I'd be happy to assist.

To improve the user experience and make them aware that the search form and the results are getting updated, you can include a spinner graphic in the view's "Search and Pagination" section.
( example screenshot attached )

Note: The "Spinner graphics" button inserts the "wpv-filter-spinner" shortcode:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-filter-spinner

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2428237

a.R

Formerly, the search form was updated IMMEDIATELY, and this is ABSOLUTELY NECESSARY for satisfying user experience.

I have never seen a website where the search form is updated after results are displayed.

#2428977

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

show-all-options.png

Thanks for writing back.

In the view's search settings, you can select the option "Always show all values for inputs", so that the search form's options are not updated with each change in the search form field.
( example screenshot attached )

When the view's search form is set to update field options based on each selection change, then it processes the results in the background from the database, through AJAX. The larger and more complex the data involved, the more time each AJAX request will take to process the results and update the search form field options, accordingly.

#2429629

a.R

Ok, thank you.

However, this view is set to always show all search values, so no need to wait for search results.

This is really bad...

#2430311

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

That is strange and in that case, I'll need to see how this view is set up in the admin area.

Can you please share temporary admin login details, in reply to this message?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

#2431283

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the access details.

I've reviewed the involved view "Suche5-KOPIE" and it is a fairly complex setup that includes several performance-heavy elements:

1. The view includes several filters for the custom fields and taxonomies

2. The ordering setting is set to use a custom field "Field - mrp_rating_result_1_star_rating"

3. Infinite scrolling is turned on for the pagination

4. The search is set to update the results with each input change

5. The view's "JS editor" includes a quite complicated script that listens for a number of events like:
- js_event_wpv_parametric_search_form_updated
- js_event_wpv_parametric_search_triggered
- js_event_wpv_parametric_search_started
- js_event_wpv_parametric_search_results_updated
- js_event_wpv_pagination_completed

Considering the view is performing all these server-side and client-side (front-end) operations, I feel that the time it takes to update the results, after a change in search form is quite nominal.

I'm afraid, I don't have any practical recommendations to further speed this up, which won't include cutting down or sacrificing, one or more items mentioned above.
( i.e. balancing between the performance and functionality )

#2432163

a.R

It´s ok to wait some seconds for the search results.

But it´s REALLY EMBARRASSING to wait multiple seconds to see if one has clicked on a search term or not!
Users will click a second time, then it will be back to the previous status and seemingly NOTHING will have happened......

It´s SO bad for the users!

And all the arguments you mentioned should NOT slow THAT down!
This has worked perfectly for YEARS.

#2433443

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Here is a quick screen capture of how much time it takes on my screen to update results:
hidden link

If you experiencing longer delays, can you please share a screencast showing how it appears for you?

#2434045

a.R

You still haven't understood what I'm trying to tell you:
It's not about updating the results.
It's about displaying the search form updates.
When a user clicks in the search form, it'll take several seconds to display the change. So users will click a second time, seemingly nothing has changed....

Saying that, I've seen now the problem seems to be (partially?) gone! Have you changed something?

THANK YOU 🙂

Achim

#2434857

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back and I can confirm that I haven't made any changes to the website.

I understand that you're referring to the slight pause that comes when a form input element is changed. But that is because there are many events and listeners involved, which are added using the custom JS script in the view.

Here is a quick test. You can temporarily remove that custom script from the view and then check the search form again and you won't experience the same pause.

To optimize the performance and execution of that custom script, I'll recommend hiring a Javascript expert, who can suggest improvements, accordingly.

You'll find the list of Toolset's recommended contractors at:
https://toolset.com/contractors/

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