Home Forums WoodMart – Premium Template Issue with poor search performance

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by Artem Temos Artem Temos 3 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #132425
    CM
    CM
    Customer

    Hello,

    We have used the WoodMart WordPress Template to build a bookstore eshop, with about 3500 titles (books). We are facing an issue with the Ajax Search at the top. It takes too long (about 15 seconds) to display the results.

    The web site is hosted on a dedicated VPS server on an established and well respected provider, so hardware speed should not be an issue here. We are also using php7.3, which provides a lot of speed improvements. Test have been run before going live (aka no stress on the server due to lots of hits) as well as after going live. The behavior is quite similar.

    To speed up the site, we are also using W3 Total Cache plugin, configured to use the local Redis object caching server. Using this configuration, we have noticed speed improvements in all aspects except the search functionality.

    While troubleshooting, we noticed that each time a search is run, a full query is being run against the database. It seems as if the search is bypassing any kind of caching. We were wondering if it would be possible for the Ajax search to take advantage of the caching methods (W3 Total Cache + Redis) so if a user is searching with the same search term as another user did some time ago, to get the results of the previous search.

    Moreover, it seems that every single character typed in the search field, launches a new php search process. All search processes are hammering concurrently the database and it takes more than 15 seconds(!) to display the results (for a search string of 10 characters). Instead, if you copy/paste the search term, it takes a couple of seconds to display the results. The more characters the user types in the search, the more processes are spawned. If a user types too many characters, they might be able to crash the application/server.

    Can something be done about it? Like waiting for at least 3-4 characters to be typed in before starting the search. Or maybe wait for 3-4 characters before starting the search and if the user is typing more, group every 4 characters together before starting a different search process.

    The search is also performing poorly when you type some characters and then you hit the enter key. I guess this has to do with all the php processes that have been spawned for every single character typed in the search box. The more spawned processes, the more time it takes to show any results.

    We would appreciate any other suggestion, to increase the performance of the search box at the top.

    Private Content Hidden
    #132426

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    1. Caching mechanisms should be configured separately from the theme and our theme shouldn’t utilize its functions. So if they should cache AJAX requests then it should be configured somewhere on their side.

    2. When you type a new character, the script prevents all previous requests. You can see it in Google Chrome network tab https://gyazo.com/d57a20896c3c74a90704f95b5704ae2d

    3. We will add an option to start search only after 2-3 symbols are typed in our next theme update.

    4. Check how standard search works on the default WordPress theme. If you see that it is much faster, please, leave default theme active, disable all external plugins and send us your admin and FTP access so we can check.

    Kind Regards
    XTemos Studio

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.