Get WPFTS Pro today with 25% discount!

Slow search on a site based on Divi Theme

  • In fact, the problem can sometimes be caused not by a slow search by WPFTS plugin or even by a slow generation of Smart Excerpts. The search slowdown was caused by a bug (or flaw) in the code of the Divi theme itself.

    Let's get closer to the code. So, one of the clients contacted us with a complaint that some search requests took too long to process (about 10-12 seconds), which is extremely non-standard for WPFTS even with 500k records, and the client at that time had less than 1000 records. The problem was detected on WPFTS Pro v2.51.212.

    After spending several hours deeply studying the code, we found out that due to a flaw in the code of the Divi Theme, post previews are generated anew each time when displaying search results, while logically they should be generated only once and then used.

    There is indeed such a check in the code, but it only works for those images that are smaller in size along one of the axes (height or width). If the image is larger than the target size of the preview, then the code for checking the presence of an already generated preview is simply not called, and the preview is generated again.

    This spends 1-2 seconds for each post in the output results, which, with a number of 10 posts, gives a noticeable slowdown of 10-15 seconds.

    Below we have attached a new version of the Divi Theme file which is suitable for version 4.25.2. We have already reported the bug to the authors of this topic, so we hope that it will be fixed in future versions.

    We hope this article helped you.

Suggested Topics

Be the first to read the news!

We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

Join Us Now!

We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.


The forum powered by NodeBB | Contributors