Wondered why this wp-admin was running so slow, installed query monitor and saw that imagify is running up 15-20 seconds per page load in wp-admin…
SELECT COUNT( p.ID ) FROM wp_posts AS p INNERJOIN wp_postmeta AS imrwpmt1 ON ( p.ID = imrwpmt1.post_id AND imrwpmt1.meta_key = ‘_wp_attached_file’ AND p.post_mime_type IN ( ‘image/jpeg’,’image/png’,’image/gif’,’image/webp’,’application/pdf’ ) AND p.post_type = ‘attachment’ AND p.post_status IN ( ‘inherit’,’private’ ) ) INNERJOIN wp_postmeta AS imrwpmt2 ON ( p.ID = imrwpmt2.post_id AND imrwpmt2.meta_key = ‘_wp_attachment_metadata’ ) WHERE p.post_mime_type IN ( ‘image/jpeg’,’image/png’,’image/gif’,’image/webp’,’application/pdf’ ) AND p.post_type = ‘attachment’ AND p.post_status IN ( ‘inherit’,’private’ ) AND imrwpmt1.meta_value NOTLIKE ‘%://%’ AND imrwpmt1.meta_value NOTLIKE ‘_:\\\%’ AND REVERSE (LOWER( imrwpmt1.meta_value )) REGEXP ‘^gpj\..*|^gepj\..*|^epj\..*|^gnp\..*|^fig\..*|^pbew\..*|^fdp\..*’
This topic was modified 1 year, 7 months ago by Thane.
Though we hardly receive such high CPU usage case or slow site, feel free to install this helper plugin that you can use to slow down AJAX calls to once every 120 seconds, which can be downloaded using the following link:
Unfortunately same problem. After the update, almost nothing worked anymore. Horrible. I don’t like continuing to install “Helper”. First back to 2.2.2
I did some digging and it turns out Imagify wastefully prints out a hidden pricing modal in the admin_footer hook on every single page load in all pages of the wp-admin. It doesn’t even check if the site already has an active subscription making the pricing modal useless.
The modal uses the aforementioned heavy SQL query to count the number of original images on the site to show in the modal. The image below shows the hidden modal made visible with browser devtools.
The following code snippet can be used to disable the rendering of the modal until the developers optimize their code to only load the modal when necessary.
<?php /** * Stops the Imagify payment modal from printing which * calls the slow imagify_count_attachments function * that slows down the wp-admin. * * @see https://ww.wp.xz.cn/support/topic/imagify-causing-slow-down-across-all-wp-admin-slow-query/ */ function disable_slow_imagify_payment_modal() { if (class_exists('\\Imagify_Views') && method_exists('\\Imagify_Views', 'get_instance')) { $imagify_views = \Imagify_Views::get_instance(); remove_action('admin_footer', [$imagify_views, 'print_modal_payment']); } } add_action('admin_footer', 'disable_slow_imagify_payment_modal', 5);
This obviously makes the modal unusable, but it shouldn’t matter if the site already has an active subscription.
Disabling the modal drastically reduced the load time from 13s to 0.5s on a site with ~47k images.
The imagify-beat-control plugin offered as a solution by the plugin author doesn’t solve this.
This reply was modified 1 year, 7 months ago by Aleksi Leppänen. Reason: Address the solution offered by the plugin author
This issue was identified and has now been resolved by our development team. Please update to the latest version, 2.2.3.2, to ensure you have the fix applied.
Thank you for your patience and for bringing this to our attention. Let us know if there’s anything else we can assist you with.
Nope, i am on 2.2.3.2 And i still cant edit a single page, as i have the Pop-up loading screen “Thank you for being awesome!” not able to close or remove it, except if i deactivate the plugin.
Also wanna mention that i am on second week now, trying to get any response from the support team, and still zero replies or solutions to this problem.
This reply was modified 1 year, 6 months ago by TodeUshlinkovski.