Navigation überspringen

[Warten auf das Feedback der Benutzer] My View search is taking around 5 seconds, how do i add a progress-bar?

This support ticket is created vor 2 Wochen, 5 Tage. 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.

Dieses Thema enthält 3 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von Christopher Amirian vor 1 Woche, 4 Tage.

Assistiert von: Christopher Amirian.

Author
Artikel
#2806942

Tell us what you are trying to do?
I have a View search (doing a full text search thru 644 posts) that's taking around 5 seconds to complete, can I add a progress bar/ or message that search is in progress. Alternativley is there any way to speed up View search.

Thanks for your help

What is the link to your site?
versteckter Link

Thanks for your help

#2807029

Christopher Amirian
Unterstützer

Sprachen: Englisch (English )

Hi,

Welcome to Toolset support. It is not possible to add a progress bar with a method that you use as you use the page reload method that invalidates any Javascript code.

The visitor will need to wait for the page to load to see the results.

Alternatively, you can enable the Ajax mode in Toolset in the search view:

https://toolset.com/course-lesson/creating-a-custom-search/

There are a few methods to cache the website but it is a general rule and not related to Toolset per see. You can do research here:

https://toolset.com/documentation/legacy-features/views-plugin/how-to-use-views-parametric-search-on-large-sites/

versteckter Link

Thanks.

#2807726

I'm using a View text search of custom field with Relevanssi (free version) and the search is taking around 5 seconds to return results. I'm searching 644 posts. How can I improve the search time 'cause the user assumes it's not working and leaves the site

#2807739

Christopher Amirian
Unterstützer

Sprachen: Englisch (English )

Hi,

That is hard to pinpoint and needs a professional to profile your website. You are welcome to hire a developer to do that:

https://toolset.com/contractors/

I can suggest general options that might help:

Optimize Relevanssi Settings

- Limit Indexed Content: Ensure that only necessary post types and custom fields are indexed. Navigate to Settings > Relevanssi > Indexing and select only the relevant post types and fields.

- Disable Custom Excerpts: Generating custom excerpts can slow down searches. In Settings > Relevanssi > Excerpts and Highlights, uncheck the option for creating custom excerpts.

- Rebuild the Index: After adjusting settings, rebuild the index to apply changes. This ensures that only the selected content is indexed, improving search efficiency.

Enhance Overall Performance

- Enable AJAX Pagination: Utilize AJAX for search results to prevent full page reloads, providing a smoother user experience. In the View editor, enable AJAX updates for the search and pagination settings.

- Implement Caching: Toolset Views offer caching options. Enable caching in the View settings to store query results, reducing database load on subsequent searches.

- Limit Results Per Page: Displaying too many results can slow down the page. Set a reasonable limit (e.g., 10-20 items per page) in the View settings to improve load times.

Additional Recommendations

Database Optimization: Regularly optimize your database using plugins like WP-Optimize to clean up overhead and improve performance.

Server Resources: Ensure your hosting environment has sufficient resources (CPU, RAM) to handle search queries efficiently.

Monitor Performance: Use tools like Query Monitor to identify slow queries and optimize them accordingly.

Thanks.