Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter KTS915

    (@kts915)

    Hmm, interestingly, although I’m using a caching plugin, for which you recommend the javascript method of recording post views, it looks as though the PHP method works fine when using Comet Cache.

    Plugin Author dFactory

    (@dfactory)

    Good to know about Comet Cache.

    When it comes to admin-ajax.php, it should not slow down ajax requests – PVC does nothing in the admin (except dashboard widget), and is used to fire a simple function. Maybe there’s another factor in this.

    Regards,
    Bartosz / dfactory team

    Thread Starter KTS915

    (@kts915)

    Unfortunately, there’s no other factor involved in the admin-ajax.php issue. I have spent quite some time diagnosing this, and have turned off other plugins to make sure. The most helpful resource I found is here: https://www.keycdn.com/blog/admin-ajax-php-slow/

    When the plugin is active, admin-ajax.php is called, and that adds another 0.5 seconds to the page loading time. When the page otherwise loads in around 1 second, that means an additional 50%.

    Obviously, if the PHP method continues to work with Comet Cache, then I’ll stick with that. But you might want to take a look at the above article just the same.

    Plugin Author dFactory

    (@dfactory)

    If you can enable the JS mode we’d like to take a look.

    Thread Starter KTS915

    (@kts915)

    OK! JS mode is now enabled, and the site is https://webby-books.com/ I have been using GTMetrix to see what’s going on: https://gtmetrix.com/

    Plugin Author dFactory

    (@dfactory)

    Looks like in most cases you have only one admin-ajax.php request per page.

    So I believe the influence on loading time is related to the fact that admin-ajax.php is called at all, not that PVC is doing that.

    If there was a different plugint doing Ajax on page load, you would have the same result probably.

    The time required to run admin-ajax.php depends on number of things like your server enviroment, number and quality of plugins used, current theme, etc.

    I may tell you we have a plan to provide “slim” ajax mode for PVC, not relying on admin-ajax, that will load only minimal resources (and make the request much faster). However this would be an experimental ferature – according to any WP guidlines Ajax calls should run just as it is now in PVC.

    Thread Starter KTS915

    (@kts915)

    Looks like in most cases you have only one admin-ajax.php request per page.

    Yes, that’s right.

    So I believe the influence on loading time is related to the fact that admin-ajax.php is called at all, not that PVC is doing that.

    But PVC is what is calling admin-ajax.php

    You can tell that from following the article to which I referred above (https://www.keycdn.com/blog/admin-ajax-php-slow/).

    I can also tell that is true because if I turn off PVC, admin-ajax.php is never called.

    I may tell you we have a plan to provide “slim” ajax mode for PVC, not relying on admin-ajax, that will load only minimal resources (and make the request much faster).

    I am certainly interested in trying that out.

    Plugin Author dFactory

    (@dfactory)

    The speed of admin-ajax.php doesn’t depend on our plugin but on your WordPress install.

    The article is great as it may help you optimize your site, but it’s unrelated to PVC.

    Just fun fact about admin-ajax speed – if you enable WooCommerce for example, the speed might jump from 500ms to 2 seconds or so : )

    Thread Starter KTS915

    (@kts915)

    Yes, I understand that: that’s the problem with admin-ajax.php: it calls stuff from the whole site. That’s why I don’t want admin-ajax.php to run at all.

    Since PVC is the only thing calling admin-ajax.php, the purpose of opening this thread was to see if you can find a way to have PVC work without calling it. Your proposed “slim” ajax mode sounds like what I was hoping for.

    Plugin Author dFactory

    (@dfactory)

    We don’t always like admin-ajax.php too (however it has some imporant advantages).

    We’ll work on a slim version, we’ll se how it works.

    Thread Starter KTS915

    (@kts915)

    Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘admin-ajax.php’ is closed to new replies.