Home › Forums › Ticket Products › Event Tickets Plus › Events admin page loading insanely slow
- This topic has 16 replies, 4 voices, and was last updated 6 years, 10 months ago by mindshare.
-
AuthorPosts
-
May 11, 2017 at 3:00 pm #1282599mindshareParticipant
I was having a 30 second to 2 minute loading time on the events admin page (wp-admin/edit.php?post_type=tribe_events)
Using Query monitor there was 165 slow queries, 138 of them were all the same function from your ticket event-tickets-plus addon: Tribe__Tickets_Plus__Commerce__WooCommerce__Main->get_orders_by_status
https://docs.google.com/spreadsheets/d/1umAIIExEN655lA_2k6O-rnWi9_5f_sF1juuSnlqNBug/edit?usp=sharingI am only displaying 20 events per page, it seems like this function runs on ALL events regardless of the admin page you are on?
I have attached a screenshot of my event counts, 199 total events is not a lot. Also I used your plugins to clear recurring events, I have none on the site now.
If I go to your deceptive old function it loads much much faster with no errors.
I switched the below line:
$incomplete_orders = version_compare( '2.2', WooCommerce::instance()->version, '<=' ) ?
$this->get_orders_by_status( $ticket_id, $status ) : $this->backcompat_get_orders_by_status( $ticket_id, $status );
To this:
$incomplete_orders = $this->backcompat_get_orders_by_status( $ticket_id, $status );
Obviously editing the plugin is not good, but the function was killing the events.Another 23 slow queries are these:
Tribe__Tickets_Plus__Commerce__WooCommerce__Orders__Cancelled->real_get_count
Finally these two functions are taking over 2 second each:
Tribe__Tickets__Cache__Abstract_Cache->fetch_posts_with_ticket_types
Time: 2.8285
Tribe__Tickets__Cache__Abstract_Cache->fetch_posts_with_ticket_types
time: 2.4797The above two functions taking that long for 199 events and on a page only displaying 20events in the admin seems insane.
May 12, 2017 at 6:12 am #1282891CliffMemberHi. Sorry you’re experiencing this, and thanks for this thorough report.
Before I pass it along to our developers, could you please explain what you meant by “deceptive old function”?
Also, I agree your number of events is not many. On my own localhost, I have 714 events; 16 are ticketed and it doesn’t load quickly either, but I don’t have the same duplicates you’re reporting: https://cl.ly/3R1Q0k270c2l
I see you have a lot of active plugins. Please follow our Testing for Conflicts Guide (basically switch to Twenty Seventeen theme and deactivate all plugins and custom code other than Modern Tribe plugins and WooCommerce core) and see if that changes things.
Thank you.
May 12, 2017 at 11:51 am #1283226mindshareParticipantThis reply is private.
May 12, 2017 at 1:19 pm #1283258CliffMemberThanks for the extra info. Could you share your slow/duplicate queries from Query Monitor while in Testing for Conflicts mode?
May 12, 2017 at 4:32 pm #1283325mindshareParticipantThis reply is private.
May 16, 2017 at 7:37 pm #1284707CliffMemberSorry for the delayed reply, here.
I’ve passed all your feedback onto our developers to take a closer look and see what they can reproduce and to determine the best way forward with your findings.
I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once there’s an update from them. I cannot guarantee when it will be fixed as it’s in the development team’s hands now.
I apologize for this issue and appreciate your understanding and patience.
May 18, 2017 at 12:33 am #1285332BarryMemberHi @mindshare!
I was taking a look at this but – initially – was unable to verify your findings with regards to the get_orders_by_status() method specifically.
To help me better assess this, could you if at all possible share an export of your database? Most hosts provide a means of doing this and you could then upload it here in zip format as a private reply.
If you’re uncomfortable sharing this data that’s completely understandable, but I wanted to check if it was possible first of all.
Thanks 🙂
May 24, 2017 at 2:32 pm #1288625mindshareParticipantThis reply is private.
May 24, 2017 at 4:23 pm #1288661BarryMemberThis reply is private.
May 25, 2017 at 10:01 am #1288984mindshareParticipantThis reply is private.
May 25, 2017 at 4:34 pm #1289140BarryMemberThis reply is private.
May 26, 2017 at 5:33 pm #1289665BarryMemberThanks again for sharing the data. With that in place I had a much better insight into the problem and have logged a bug as a result — we’ll do our best to ship an update helping to improve things as soon as we can.
June 1, 2017 at 9:16 pm #1292198GeorgeParticipantHey there,
We published a Maintenance Release today that includes a number of fixes, including some that should address some of the issues reported here.
Check out our release notes for it here to learn more → https://theeventscalendar.com/maintenance-release-for-the-week-of-29th-may-2017/
Cheers,
GeorgeJune 6, 2017 at 10:10 am #1293883mindshareParticipantCheers!
Much better. Thank you.
June 6, 2017 at 11:26 am #1293911BarryMemberGlad it improved things.
I also want to share something else that is possible as of the latest release. If you add the following snippet, ideally to a custom plugin, it will remove the attendee column (which indicates the percentage of tickets sold):
add_filter( 'tribe_tickets_supported_admin_columns', '__return_empty_array' );
If you need that column to be present then of course this would not be the best way to go, but if you don’t then it will stop a potentially large number of queries from running when building up the admin list table.
-
AuthorPosts
- The topic ‘Events admin page loading insanely slow’ is closed to new replies.