Backend event page loading slow.

Home Forums Calendar Products Events Calendar PRO Backend event page loading slow.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1137016
    Austin
    Participant

    My backend page http://telhai.staging.wpengine.com/wp-admin/edit.php?post_type=tribe_events is loading version slow. With a default theme active and all other plugins disabled this page is still taking 3.5 secs to load. Most of this is tied up with some slow queries: https://cloudup.com/c51UC1CekU3. Any suggestions?

    #1137503
    Brook
    Participant

    Howdy Austin,

    I would love to help you with this.

    Typically our performance audits are focused on the front-end views. I took the past couple hours to dive in to the backend queries to see if anything could be done, and I did find three areas ripe for optimization.

    Actually in your screenshot you are showing two of the areas I found.

    1) In this file: /the-events-calendar/src/Tribe/Admin_List.php I believe line 371 is unnecessary. It looks like this:

    $query .= " LEFT JOIN {$wpdb->postmeta} as eventStart ON( {$wpdb->posts}.ID = eventStart.post_id AND eventStart.meta_key = '_EventStartDate') ";

    For now I have just straight up removed that line from the plugin, and am testing it out to see how it works. I believe the only reason it was inserted is because the original dev copy/pasted that line from elsewhere, and did not finish removing the unnecessary bits. Doing this might shave up to a half second from your load time.

    2) The main query that takes 1.8 seconds can be optimized too. In typical scenarios we could remove one of those JOINs, in an exotic scenario we could remove both. This will shave some off of your loading time, maybe a full second.

    Those are some substantial improvements. Usually when we do audits there is very little to optimize, partly because we do them so regularly. But like I said, the Admin area is not usually our focus.

    I appreciate your bringing this to my attention. All three things I found are now logged as separate bugs. We will get back to you one of the two above ones are fixed. The third one does not appear to impact your site (it’s pretty rare it would hit any site). It is likely they will be fixed separately, so we might end up responding twice here. In the mean time let me know if you have any questions.

    Cheers!

    – Brook

    #1137522
    Austin
    Participant

    Sounds great. Look forward to trying out the optimized queries.

    It looks like this particular site is just slow all around. Any general recommendations? The frontend: http://telhai.staging.wpengine.com/events/ is taking over 20 secs.

    #1138524
    Brook
    Participant

    Wow, that’s a long time. I was under the impression only your backend was loading slow.

    You main view is Month View, our slowest view. It has to run a lot of queries to support all of the calendars features. You should enable the Month View Cache in WP-Admin > Events > Settings > Display to help speed i up some. Further adding this snippet to your site (such as in your theme’s functions.php file) will disable JSON LD on Month View, making the caching a lot more effective:

    https://gist.github.com/elimn/9ce1c3e64d060b758e22627b815455ae

    We are considering caching JSON LD alongside month view in future version, which will render this snippet fairly useless from a performance standpoint. But for now the fastest thing to do is disable it.

    Did that help reduce the page load times? Keep in mind the first page load will be after the caching and snippet are enabled. But subsequent ones should be much faster.

    Cheers!

    – Brook

    #1138598
    Austin
    Participant

    Ok so disabling JSON LD on Month View took the load time from over 20 secs to around 9 secs. Thanks for the tip.

    #1138610
    Brook
    Participant

    That’s a big improvement. Still a bit slow though. You do have a lot of events, no question about it. More posts = slower site, whether those posts are events, on the blog, pages, WooCommerce Orders, etc.

    But still in theory Month view should be relatively fast after the cache has kicked in. Your List View takes about 5 seconds to load, which is about fair considering the amount of events. I would expect Month View to take as long.

    Would you be interested in adding an admin account to your staging server for me to login with? You can delete it after. I am keen to log in and view the Query Monitor output for myself to see if there is anything else going on specific to your site. If you would like this please share the new login info here in a private reply. I won’t be changing any settings or anything, so if please make sure Query Monitor is still an active plugin. If you don’t want to do this though, no worries I totally understand.

    Cheers!

    – Brook

    #1141874
    Austin
    Participant

    This reply is private.

    #1142261
    Brook
    Participant

    This reply is private.

    #1142378
    Austin
    Participant

    This reply is private.

    #1142832
    Brook
    Participant

    This reply is private.

    #1142833
    Brook
    Participant

    This reply is private.

    #1151040
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

    #1437412
    Nico
    Member

    Hey,

    Happy to share with you that a new maintenance release (for the Week of 22th January 2018) is out, including a fix for this issue.

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-22-january-2018/

    Please update the plugins and let us know if the fix works for your site,
    Best,
    Nico

    #1456386
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Backend event page loading slow.’ is closed to new replies.