Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Performance impact
This topic contains 6 replies, has 2 voices, and was last updated by anfeloga 10 years, 4 months ago.
- AuthorPosts
- April 9, 2014 at 3:41 am #1617
Hi
I ran a performance test with p3 plugin and this is what I get (see attachment 1).
After that I ran a speed test in Pingdom Tools and this is what I get for Ajax Search Pro (see attachment 2).
After this 2 tests, I can see than for some reason your plugin is impacting a lot the site in performance and as You can see in Pingdom, the wait time is a lot and in p3, this is reflected in a 43% of total load plugins (75 plugins, a lot a lot I know).
Any idea of what can I do to improve this? Thanks for your time!
April 9, 2014 at 3:41 am #1618Another thread because I couldn’t upload the 2 attachments.
Attachments:
You must be logged in to view attached files.April 9, 2014 at 8:37 am #1621Hi!
I think I have found the reason. If I’m guessing right, then you had an older version of the search installed, where “Image Precache” was enabled. I left that code in the search in case someone needs it, but it cannot be disabled from the frontendt. Anyways, all you need to do is delete a few lines, and that empty 1,2s ajax request will disappear.
Open up the wp-content/plugins/ajax-search-pro/ajax-search-pro.php file.
Delete lines 232-250:
if (get_option('asp_precacheimages')!=1) return; ?> <script type='text/javascript'> $(document).ready(function($) { function preCache() { var data = { action: 'ajaxsearchpro_precache' }; $.post(ajaxsearchpro.ajaxurl, data, function(response) { console.log(response); }, "json"); } preCache() setInterval(function(){ preCache(); }, 15000); }); </script> <?php
Clear your cache and CDN cache, and you shouldn’t see that long request anymore.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 11, 2014 at 3:18 pm #1640Hi Ernest
Actually yes, I was using 2.1, I’m updating rigth now to 2.4. After the update should I delte those lines or is ok with this?
Thanks for your quick reply!
April 11, 2014 at 3:19 pm #1641Hi!
Yes, you should delete those lines even after update, just to make sure 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 11, 2014 at 3:21 pm #1642Thanks a lot! I will update You after doing this and run a new test in pigdom and in p3.
April 11, 2014 at 3:50 pm #1643UPDATE
I ran the two tests and in p3 the plugin doesn’t even appear (this is pretty good) and in pingdom neither the ajax_search.php, and the ajax search pro script is loading fast.Thanks for your time and support!
- AuthorPosts
You must be logged in to reply to this topic.