Events admin page loading insanely slow

Home Forums Ticket Products Event Tickets Plus Events admin page loading insanely slow

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1282599
    mindshare
    Participant

    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=sharing

    I 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.4797

    The above two functions taking that long for 199 events and on a page only displaying 20events in the admin seems insane.

    #1282891
    Cliff
    Member

    Hi. 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.

    #1283226
    mindshare
    Participant

    This reply is private.

    #1283258
    Cliff
    Member

    Thanks for the extra info. Could you share your slow/duplicate queries from Query Monitor while in Testing for Conflicts mode?

    #1283325
    mindshare
    Participant

    This reply is private.

    #1284707
    Cliff
    Member

    Sorry 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.

    #1285332
    Barry
    Member

    Hi @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 🙂

    #1288625
    mindshare
    Participant

    This reply is private.

    #1288661
    Barry
    Member

    This reply is private.

    #1288984
    mindshare
    Participant

    This reply is private.

    #1289140
    Barry
    Member

    This reply is private.

    #1289665
    Barry
    Member

    Thanks 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.

    #1292198
    George
    Participant

    Hey 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,
    George

    #1293883
    mindshare
    Participant

    Cheers!

    Much better. Thank you.

    #1293911
    Barry
    Member

    Glad 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.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Events admin page loading insanely slow’ is closed to new replies.