Theme and Plugin Support
Tagged: slowness
-
AuthorPosts
-
-
July 14, 2021 at 4:21 PM #124820odedtalmonParticipant
Hello,
The WP admin is very slow, takes 5s on average to load any page, so I installed Query Monitor and it shows a slow query, view attached image for inspection.Why is
wcmp_get_orders()
Copyeven running on the backend on LiteSpeed Cache plugin’s pages?
-
July 14, 2021 at 8:16 PM #124856Raju The Cool GuyKeymaster
Hi,
wcmp_get_orders function just return wcmp suborders. This comes from WP_Query ( like default wordpress query funtion ). You might have huge data in your one page.
Thanks -
July 14, 2021 at 9:00 PM #124858odedtalmonParticipant
Hey Raju!
The thing is that this query runs on all pages on the WP-Admin -
July 15, 2021 at 8:29 PM #124936Raju The Cool GuyKeymaster
Hi,
As per our default code, we don’t call these functions to all the pages. So “The thing is that this query runs on all pages….” this is not possible. We have checked the code again. In the admin section, we have called this function in the time to order menu count. We have also checked the query plugin. But don’t find any such issue. This might be due to huge order data. -
July 16, 2021 at 5:50 PM #124977odedtalmonParticipant
16,500 orders is considered huge?
If it is what do you recommend I do in order to help with the slowness?
Thanks Raju! -
July 16, 2021 at 8:33 PM #124998Raju The Cool GuyKeymaster
Hi,
This is completely site-specific ( may occur due to database data ). Or you need to check each and every line code to find the issue. Which is time-consuming and difficult. As per your query monitor debug result, we have used wcmp_get_orders() this function for counting post. You can do one thing — remove this section — Please check by using this code. It may help. But not sure.add_action('init', function() { global $WCMp; remove_filter('woocommerce_menu_order_count', array($WCMp->admin, 'woocommerce_admin_end_order_menu_count')); });
CopyThanks
-
July 17, 2021 at 1:54 PM #125016odedtalmonParticipant
Hello Raju,
The code your provided makes a significant difference in WP-Admin pages loading times.
Could you say if there are any implications to this?
Thank you! -
July 19, 2021 at 7:01 PM #125101Raju The Cool GuyKeymaster
@odedtalmon, the above code, should not cause any other issue.
-
July 19, 2021 at 7:02 PM #125102odedtalmonParticipant
Thank you Raju!
-
July 19, 2021 at 7:21 PM #125104Raju The Cool GuyKeymaster
You are welcome 🙂
-
-
AuthorPosts
The topic ‘Slowness in WP-Admin’ is closed to new replies.