• Resolved levymetal

    (@levymetal)


    I manage a website that has over 110,000 WordPress users. The WP Admin interface has become really slow (it takes about 10 seconds for each page to load). Using the Debug Bar plugin, I narrowed it down to a function called count_users().

    This function fires on every admin page load, but only when the w3tc plugin is enabled. If I disable the w3tc plugin, count_users() not called, and WP Admin is fast again.

    I’ve tried to dig into w3tc source to figure out why count_users() is getting triggered, but haven’t had any luck so far.

    Does anyone have any idea why this is happening, and/or what I can do to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter levymetal

    (@levymetal)

    After further investigation, it turns out that w3 total cache is causing an issue with the update_core transient.

    On line 636 of wp-includes/update.php, you’ll find the following line: $current = get_site_transient( 'update_core' );

    When the plugin is enabled, this line fails; get_site_transient( 'update_core' ) returns false. This causes wp_version_check() to be called on every page load.

    I will continue to investigate to figure out why w3 total cache is affecting the update_core transient, but some input would be greatly appreciated.

    However, this is not the cause of the slowdown (neither is count_users). Even when I comment these functions out of WP Core, WP Admin is still slow. With the plugin disabled, WP Admin is fast.

    • This reply was modified 8 years, 3 months ago by levymetal.
    • This reply was modified 8 years, 3 months ago by levymetal.
    • This reply was modified 8 years, 3 months ago by levymetal.
    Thread Starter levymetal

    (@levymetal)

    I’ve narrowed this down to the Object Cache setting in w3 total cache. I had Object Cache turned on, using memcached. Turning this off has made WP Admin fast again.

    I’m going to mark this as resolved, I’m assuming that the Object Cache isn’t massively important.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘prevent wp_count_users’ is closed to new replies.