Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Also, check to see if you have a wp-content/db.php drop-in.

    Lastly, please also share your Site Health info via our submission form.

    Thread Starter itking

    (@itking)

    When I run EXPLAIN command, i see this:

    2020-09-04_07-09-04

    Thread Starter itking

    (@itking)

    also for submitted.

    Note: when i disabled AMP plugin all works fine.

    Plugin Author Weston Ruter

    (@westonruter)

    Thanks. We will evaluate the results.

    Do the performance problems go away when you turn off AMP Developer Tools in your WordPress user profile settings?

    Thread Starter itking

    (@itking)

    Yes when i disable AMP plugin , all works fine. no issue

    Plugin Author Weston Ruter

    (@westonruter)

    No, not deactivate the AMP plugin as a whole. I’m talking about “AMP Developer Tools” in your WordPress user profile settings:

    AMP Developer Tools toggle

    Thread Starter itking

    (@itking)

    Turning off developer tool no effect, same slow admin issue.

    Plugin Author Weston Ruter

    (@westonruter)

    OK, I see you are right.

    I have, however, found a way to prevent that slow query from happening. It shouldn’t actually be running when AMP Developer Tools are turned off, so that’s a bug we’ll fix. It doesn’t explain why the query is slow, but at least now I see why the query is running in the first place.

    In any case, here is the plugin code that you can use to prevent that query from running:

    add_action(
    	'init',
    	function () {
    		$post_type_obj = get_post_type_object( 'amp_validated_url' );
    		if ( ! $post_type_obj ) {
    			return;
    		}
    
    		if ( $post_type_obj->show_in_menu ) {
    			return;
    		}
    
    		remove_action( 'admin_menu', [ 'AMP_Validated_URL_Post_Type', 'add_admin_menu_new_invalid_url_count' ] );
    	}
    );

    We’ll continue investigating why that query is slow in the first place.

    Plugin Author Weston Ruter

    (@westonruter)

    Here’s the pull request which will implement that fix in the AMP plugin: https://github.com/ampproject/amp-wp/pull/5336

    Still, this is not addressing why the query is slow. It’s just preventing the query from running when AMP Developer Tools are turned off.

    Plugin Author Weston Ruter

    (@westonruter)

    Thread Starter itking

    (@itking)

    Yes, changing to innodb fix the issue. see attached.

    2020-09-06_07-50-17

    Thanks for your help.

Viewing 11 replies - 16 through 26 (of 26 total)

The topic ‘Slow Admin’ is closed to new replies.