Performance impact

This topic contains 6 replies, has 2 voices, and was last updated by anfeloga anfeloga 8 years, 8 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1617
    anfeloga
    anfeloga
    Participant

    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!

    #1618
    anfeloga
    anfeloga
    Participant

    Another thread because I couldn’t upload the 2 attachments.

    Attachments:
    You must be logged in to view attached files.
    #1621
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #1640
    anfeloga
    anfeloga
    Participant

    Hi 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!

    #1641
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #1642
    anfeloga
    anfeloga
    Participant

    Thanks a lot! I will update You after doing this and run a new test in pigdom and in p3.

    #1643
    anfeloga
    anfeloga
    Participant

    UPDATE
    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!

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

You must be logged in to reply to this topic.