3.10 Very Slow Performance on Month View

Home Forums Calendar Products Events Calendar PRO 3.10 Very Slow Performance on Month View

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #969928
    Adam Listek
    Participant

    Hello,

    After upgrading my staging site to v3.10 of The Events Calendar (free, Pro and Community Events) plugin, on the Month view I am experiencing very slow performance.

    Prior to the upgrade the page loaded around an average of 3 seconds tops whereas it now loads between 20-24 seconds. Events are limited on the Month view to 3 at a time and although turning on the new transient caching feature helps tremendously, only briefly as cache timeouts are an hour (though I know it can be changed) and any new events updated or pushed invalidate the cache.

    I have tested changing to the default 2015 theme, individually removing deactivating plugins one by one, turning off any debugging and verified that the template overrides I use are the same as your’s (when my theme was active).

    Looking at debug of the database, it does not appear to be that, but I cannot state that definitevly yet, nor are there timeouts on scripts, etc. The actual page generation time is averaging 23 seconds for the month view. All other views operate at about the same speed.

    We have around 7400 events in the system, which I do know is quite a bit but it has performed well up this point.

    I am attempting to debug the PHP calls to find out where the slowdown is but I would appreciate any and all assistance. By the way, rolling back to a previous DB backup (just before upgrade) and using the latest version of the plugin prior to v3.10 works as expected.

    -Adam

    #970127
    Nico
    Member

    Hi Adam,

    Thanks for reaching out to us, and for doing so with such a detailed report! Sorry to hear you are having this heavy performance issue.

    Let me say that what’s happening here seems rather strange as nothing was changed with month view queries. And also because 24 seconds in 3.10 vs 3 seconds in 3.9, it’s a huge difference. We are definitively interested in finding out what’s causing this.

    I’m aware you mentioned the usual debugging process described in our Testing for conflicts guide was followed but, Can you confirm the performance issue is still present with twenty-fifteen theme and no other plugins active? Can you describe your hosting environment or point me to your hosting provider specs?

    All other views operate at about the same speed.

    You mean all views are also taking 24 seconds to load?

    Looking forward to solving this,
    Best,
    Nico

    #970133
    Adam Listek
    Participant

    Nico,

    Thanks for the help! Yes, I have tried with 2015 and no other plugins enabled and when I say all other views, I mean that just the month view is displaying the performance issue. The list view and single events view load quickly.

    In regards to hosting environment, I use DigitalOcean and it’s a 1GB Ubuntu VPS running NGINX, PHP-FPM and MariaDB. Since this is a test/staging box, all caching is turned off to aid in debugging.

    -Adam

    #970188
    Adam Listek
    Participant

    Nico,

    I have been trying to do some profiling with XDebug and I am far from an expert on this but it seems to spending the majority of its time through this stack:

    1) Tribe__Events__Template_Month->setup_view (Month.php)
    2) Tribe__Events__Template_Month::get_daily_counts (Month.php)
    3) Tribe__Events__Query::getEventCounts (Query.php)
    a) tribe_event_is_on_date (date.php)
    b) tribe_get_option (general.php)

    I’ll dig into that code and see what I can find, but maybe a starting point? Thanks!

    -Adam

    #970212
    Nico
    Member

    Hey Adam,

    Thanks a lot for the follow-up and for going the extra mile on debugging the php code, we really appreciate that.

    I’ve passed along this issue to the dev team, so they can take a look into it. This process might not be as fast as our usual support, so patience on this will be necessary. We’ll also have this on our radar to check if other users are reporting similar problems.

    From my end I’ll keep you updated on any progress being made on this. And will let you know if any follow-up information is needed.

    Thanks again for your help on this. I hope we can make it work soon,
    Nico

    #971377
    Nico
    Member

    Hi Adam,

    I just want to give you a heads up on this issue. Further testing confirmed it’s a legit Bug, and a fix for this is under development. It will included in the upcoming maintenance release – 3.10.1. I can’t give you any specific date for this, but it will probably be out by the end of the month.

    Thanks again for the debugging info, it was really helpful! The <b>tribe_event_is_on_date</b> function is responsible for the slowdown! It’s only affecting sites with large amount of events.

    I’ll keep you posted,
    Have a great weekend,
    Nico

    #971418
    Adam Listek
    Participant

    Nico,

    Thanks for the update, I appreciate it. If you would like, I have my test site that I could test the patch out on. Let me know, thanks!

    -Adam

    #971944
    Nico
    Member

    Hey Adam,

    Thanks for the offering, I will let dev team know about it and if they think that may be useful I will let you know.

    Glad to have you as a customer!
    Have a great one,
    Nico

    #973155
    Kenny
    Participant

    We are also experiencing very slow performance related to this bug. Our new site is due to launch in the first week of July, so we are anxously awaiting the patch.

    Kenny

    #973222
    Nico
    Member

    Hi Kenny,

    Sorry to hear you are also experiencing this issue! While waiting for the maintenance release you can downgrade to 3.9 or try enabling Month View Cache to see if load times get better. Can’t confirm release dates, but if everything goes as expected 3.10.1 might be out next week.

    Thanks for your patience on this,
    Best,
    Nico

    #974120
    Kenny
    Participant

    Nico,

    Thanks for the speedy reply. I didn’t even realize you replied till today. :o)

    I turned on the caching for month view, and it didn’t have any effect.

    I can download 3.9.3 and try that one, but I’d like to make sure that I won’t lose any data when replacing the files with the older version. Can you please confirm this for me?

    Kenny

    #974246
    Kenny
    Participant

    Nico,

    I have tried going all the way back to 3.9.1, the earliest you offer, and it hasn’t changed a thing.

    I think the issue is that you are loading all the events, plus the images, for the mouseover on each and every event on the monthly calendar. I looked for a way to disable this in the admin, but there doesn’t appear to be a way.

    If your code is getting all that data from the sql server in one fat monolithic query, that would definitely not scale well. However, without knowing more, all I can offer is a best guess.

    Can you tell me if there is a way that I can disable the mouseover effect in month view so it won’t try to retrieve anything more than the title and link? Is that the fix you’re working on?

    Kenny

    #974415
    Nico
    Member

    Hey guys,

    Good news over here! Version 3.10.1 of The Events Calendar is just released – details here. The performance fix for month view is included, so please try updating our plugin and let me know how this goes. I know further improvement on this will be included in upcoming releases but I think performance should be acceptable now.

    @Kenny, really sorry you had to do the extra work of downgrading and now upgrading again 🙁 I hope everything runs smoothly with 3.10.1. If that’s not the case please open up a new thread so we don’t bother Adam here.

    Thanks a lot for your patience on this,
    Best,
    Nico

    #974427
    Adam Listek
    Participant

    Hello,

    Thanks for the update, I have applied the update in test and it does indeed appear to fix the issue. I appreciate the quick resolution and I have timed it between our current production and the test site and it is indeed the exact same as before. With the cache, it does increase it by a second or two which is good.

    @Kenny, you can modify the template for the mouseover in the month view (I personally replaced it with a totally different JS library as it worked better), by doing the following:

    1) Create tribe-events/month/tooltip.php within your theme directory (theme override for the tooltip).
    2) Copy the code from wp-content/plugins/src/views/month/tooltip.php into your tooltip.php within your theme directory.
    3) Modify the code as you feel fit.

    Something like:

    
    <script type="text/html" id="tribe_tmpl_tooltip">
    	<div id="tribe-events-tooltip-[[=eventId]]" class="tribe-events-tooltip">
    		<h4 class="entry-title summary">[[=title]]</h4>
    	</div>
    </script>
    

    I pretty much stripped everything out from the above, it’s a template for the JavaScript library in use.

    -Adam

    #974509
    Kenny
    Participant

    Thanks Nico! It is working better. Turns out that half the delay was being caused by something else on our page. We didn’t see that until this new version. The page load went from about 25 seconds down to around 12, and after I removed some code that was making a call to an outside api, the page now loads in about 2.5 seconds.


    @Adam
    – thanks for the guidance on changing the mouseover data. I don’t think we’ll need to do it now that the page is loading fast enough now. It’s better to have more info if we can. Plus, just removing it from the display wouldn’t thin out the query, which is what I was suggesting to Niko – an option to only get the title and link, so less time would be spent in the query. Perhaps he can add that option in later, combined with the code you suggested, so that we could choose to remove the display data, and thin the query at the same time. :o)

    Kenny

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘3.10 Very Slow Performance on Month View’ is closed to new replies.