Support » Plugin: Slimstat Analytics » Slow load time

  • Resolved imtino

    (@imtino)


    Recently after the updates, I noticed my load time have been slower than before when test on gtmetrix.com. It has something to do with admin-ajax.php.

    I didn’t have this issue before. This is recent but I’m not sure which update did it.

    I have updated heartbeat to the latest version too. Tested different frequency, tried 50 and it’s still the same.

Viewing 15 replies - 1 through 15 (of 18 total)
  • I tested your website https://www.wp-slimstat.com/ and noticed that you have the same issue. admin-ajax.php took over 2 seconds to load.

    Plugin Author Jason Crouse

    (@coolmann)

    Hi @imtino

    there are many reasons why admin-ajax.php is slower than usual, as it’s used by many plugins and WordPress itself to send information back to the server. You could start by deactivating your other plugins to see if you notice any performance improvements, and then reactivate them one by one. Just out of curiosity, how many records does your wp_slim_stats table contain?

    Thank you,
    Jason

    Plugin Author Jason Crouse

    (@coolmann)

    I would recommend installing this plugin to troubleshoot the issue:

    https://wordpress.org/plugins/query-monitor/

    Jason

    How many records does your wp_slim_stats table contain?
    34,593

    When I deactivate Slimstat then my load time is a lot faster. And I don’t see admin-ajax.php in my test on gtmetrix.com. So it’s an issue with Slimstat.

    Plugin Author Jason Crouse

    (@coolmann)

    I see. Is Slimstat configured to work in “Server” or “Client” mode in the settings?

    Where do I get that information? I don’t see it in setting.

    Plugin Author Jason Crouse

    (@coolmann)

    It’s in Slimstat > Settings > General.

    I see it now. “Tracking Mode” it’s client.

    Plugin Author Jason Crouse

    (@coolmann)

    When Slimstat is configured to work in Client Mode, all the computation needed to record a new pageview is done AFTER the page is sent to the browser, so you should not see any noticeable impact on your site’s performance. Can you try deactivating both Browscap and Maxmind in Slimstat > Settings > Maintenance, and see if that makes any difference? Also, what version of PHP do you have on your server?

    After you mentioned the client mode, I’ve switched to server mode and now I don’t see admin-ajax.php in my test on gtmetrix.com anymore. Load time is back to fast again.

    Question, if I keep it on server mode then will it impact the accuracy of the tracking?

    Plugin Author Jason Crouse

    (@coolmann)

    Not really, actually server mode is more accurate. The only drawback is that it will not work if you have any kind of caching mechanism enabled (WP Total Cache, Cloudflare, etc). That’s why we offer both options.

    Jason

    What you mean by “it will not”? Exactly what will not work? I am using varnish and cloudflare.

    Plugin Author Jason Crouse

    (@coolmann)

    The main reason for using a caching mechanism is to avoid having WordPress run every time a new request is made, and to serve a snapshot of that page bypassing any dynamic content generation. Unfortunately, this also means that Slimstat’s server-side tracking code won’t be executed, this skewing the metrics collected and displayed by our plugin. I hope this makes sense.

    Jason

    So, it will still work but the data will not be accurate?

    Plugin Author Jason Crouse

    (@coolmann)

    That’s correct.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.