Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Results slow to return
- This topic has 14 replies, 2 voices, and was last updated 12 years, 3 months ago by
iltdev.
-
AuthorPosts
-
February 13, 2014 at 3:54 pm #991
iltdev
ParticipantHi there,
I’m noticing that autocomplete results are a little slow to return. Say around 8 seconds. If I search for a word that I’ve previously search (presumed cached) it takes around 6 seconds.
I was previously using JQuery UI autocomplete at that took around 3 seconds.Is there anything I can do to speed it up or trace where exactly the long response time is coming from?
The search is set up to only search titles within a custom post type and a specific taxonomy.
February 13, 2014 at 4:25 pm #992Ernest Marcinko
KeymasterHi!
It’s usually the images in the search results. Each image must be parsed once, and the resizing may take a while if the initial image is large.
What I usually recommend is to limit the search results down to 10 from 30 (on the general settings panel the “Max. results” option)
It should speed up the search by a few seconds.You can also turn off the images temporary, to see how faster is the search without them. If it’s much faster, then definitely the images are the problem.
Let me know how it goes!
February 14, 2014 at 8:34 am #995iltdev
ParticipantCheers. I’ll give that a try. IT are currently moving my server, so there may be a little delay in getting back to you.
Chris
February 18, 2014 at 9:51 am #997iltdev
ParticipantHi,
I’m made all those changes you suggested. The response for new searches is around 5 seconds. I was hoping for around 2 seconds max.I’m using multisite and domain mapping. Do you think it’s anything to do with that?
February 18, 2014 at 2:01 pm #998Ernest Marcinko
KeymasterHi!
Multisite only affects that if you are searching multiple blogs.
I’m just finishing a newer version, so far I got around 150% speedup (from an initial 2s to around 700ms). I figured out, that the main reason for the slow responsen is mainly the fact, that for each ajax request the whole WordPress core is loaded, which is usually slow as hell. I’ve found a nice tweak to minimize the resources needed to make this functional, however it needs a bit more testing.I’m sending you a copy of this, you should experience huge speedups.
After extracting the zip file, please upload it to your server, overwriting the old search files, then open up the search you are using and save it, just so the new options get to the database. BACKUP THE OLD SEARCH FIRST!
Then open up the caching options tab, make sure, that the TimThumb option is enabled and save it.
Then do some testing, it should work much better, at least I hope so. If something goes wrong, use the backup 🙂
February 19, 2014 at 9:25 am #1007iltdev
ParticipantExcellent! I’ll give this a good test now 🙂
February 19, 2014 at 9:26 am #1008Ernest Marcinko
KeymasterMeanwhile the one I uploaded to codecanyon had been approved. It contains a few more changes then this one, you can download that as well 🙂
February 19, 2014 at 10:46 am #1009iltdev
ParticipantThings definitely seem to be a bit quicker. New keyword searches still seem to take around 4 seconds in Chrome and around 2 seconds in IE. Never thought I’d be saying IE was quicker than Chrome! haha.
I’ve noticed on my site, if I reload the page (tested with an without bypassing cache) sometimes it will load in a couple of seconds, sometimes it takes quite a while. So there’s something going on. Whatever the issue is, it might be causing the slowness of the ajax search pro results.
I previously disabled all plugins, including mu plugins. Disabling WP Better Minify actually seemed to speed things up considerably! But maybe there’s another issue somewhere 🙁
February 19, 2014 at 10:51 am #1010Ernest Marcinko
KeymasterActually there is an easy way to find out (not 100% tough):
– Turn on the caching on the search caching options panel– Try to search for any phrase once. Wait a few seconds, then search again for the exact same phrase. Do this a couple of times. After the first search, the second, third, fourth etc… searches for the same phrase should be a lot faster, I mean super fast, like under half second. If it’s not that fast, then there is definitely something else involved.
February 19, 2014 at 11:04 am #1011iltdev
ParticipantI can confirm that results are almost instant when they have been cached.
Is there a way I can use the ajaxurl to test a search directly? I notice is uses POST. I was hoping to use GET so I could do something like:
http://www.mysite.com/wp-content/plugins/ajax-search-pro/ajax_search.php?q=mykeywordFebruary 19, 2014 at 11:15 am #1012Ernest Marcinko
KeymasterOkay.
Unfortunately not, because of the search settings on the frontend. Most of the time there is too many options to handle with a GET request 🙂
I use firefox+firebug plugin to debug speed issues. The console tab didplays the ajax requests with the timeframe, it’s pretty neat.
Can you provide temporary admin access to the site? I might as well try to experiment with the search settings myself 🙂
February 19, 2014 at 12:59 pm #1013iltdev
ParticipantUnfortunately it’s an internal development server so I can’t give you access at the moment. We plan to go live on the 3rd March, so I can give you access then?
Thanks for your continued support. It has been excellent. As is the plugin 🙂
February 19, 2014 at 1:06 pm #1014Ernest Marcinko
KeymasterOkay! Thank you for all of the information!
Feel free to reply to this thread if got live, or if you have any information regarding this issue 🙂
If you have a minute, please rate the search on codecanyon. (link)
Thank you, have a nice day!
February 19, 2014 at 1:33 pm #1015iltdev
ParticipantRated 5/5 🙂
March 3, 2014 at 4:28 pm #1279iltdev
ParticipantStill can’t make any progress with this. I did wonder though, would it be possible to index pages/posts etc and query that instead?
I use Relevanssi which already indexes everything to provide fast search results. It would be cool to do something similar with AJAX Search Pro, or even use Relevanssi’s index.Just thinking out loud really 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.