Full Calendar View page loading extremely slow

Created on 11 October 2023, about 1 year ago

Problem/Motivation

Full calendar view page loads extremely slow as number of events increases.

Steps to reproduce

Go to the view page after creating the view. As the number of events increases, the page loads slower.
No patches related to this issue have helped resolve this issue.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

5.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @syeda-farheen
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

    Try using filters to reduce the amount of events to load or try the Fullcalendar Block module instead.

    https://www.drupal.org/project/fullcalendar_block β†’

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί
  • I wanted to know if we could apply a filter to the view just to get the current month events? Will this help in solving this issue?

  • Status changed to Active about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

    I don't have this problem on my site. So I can't answer your question.

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί
  • Status changed to Active about 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    I'm having that same issue as well. My site has currently around 26.000 events, back from 20 years ago and going 2 years into the future. As this module doesn't apply any filters, the SQL query tries to load all events to then determine, which ones are relevant for the current period for display. This is running into out-of-memory issues, or like others described before, makes the site really slow if the number of events is large but still can be loaded into memory.

    Like @syeda-farheen mentioned in comment #5 above, there should be a filter applied which only loads the relevant events. We can't apply such a filter in the view configuration because there is no indication which period will be displayed in the calendar. But the display plugin should be aware of the required period and should alter the query so that only required events get loaded.

    Also, I find links to the fullcalendar block module in a lot of issues here in the queue, but I have no idea why, it doesn't seem to be related in any of the cases where I saw that. What's the intention behind that?

  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

    Hi, @JΓΌrgen.

    As this module doesn't apply any filters...

    First of all, as using any other View plugin, you should be able to apply a View filter to your view. Such as published content filter, content type filter.

    What's the intention behind that?

    In plain English, you should consider using other module instead.

  • Status changed to Closed: won't fix about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    @jurgenhaas In the past my solution has been to use relative filter dates (end_value >= -2 months for example). But the con is you can't navigate back to anything outside of the filter.

    I tried the fullcalendar-block and it feels more DIY, you have to create a view very specifically to match what this block expects. BUT it does do a better job handling a large amounts of events, when using the arrows to navigate the months it loads up the current month and prev/next adjacent months.

    Roughly following this: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’ however missing from the screenshots were how it wanted the "start" date, and how to get a URL. Basically the REST export has to have this shape

    {
            "title": "EVENT NAME",
            "start": "2023-12-07T08:30:00-0500",
            "end": "2023-12-07T08:30:00-0500",
            "url": "\/node\/132691"
        },
    
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @NicholasS we switched over to fullcalendar_block as well, and it's a great experience so far. We're not worried about the specific view, that's pretty similar requirement as this module had before.

  • πŸ‡¨πŸ‡¦Canada joe.murray

    What would be appropriate is for the View to realize what is going to be displayed depending on currently configured options and start by loading just that, then lazy loading events in previous and next. So, in month view, current month, then previous and next month, or in week view, current week then previous and next week.

  • πŸ‡¨πŸ‡¦Canada mastap

    @Mingsong, we also experience this with just 100 events.
    We don't see how this can work on production with thousands of events or more. We get timeouts 500. When we add paging

    You mention you don't experience this on your site. Can you share your site URL? Maybe it could hint us.

    Have you implement some kind of caching strategy or a way to only load a subset on first view, then query the others after user interaction?
    Thanks for your insight on this issue.

  • πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

    @MastaP,

    This module has been put into 'Minimally maintain' for awhile now, which means no new feature won't be consider, particularly like this one need a lots of testing and code review works.

    Back to your question about strategy, I would suggest below,

    • Consider using recurring event instead of duplicating the same event with different date.
    • Try not to rely on other contribute module to manage recurring events other than Drupal core module. As this module only supports the field type comes with Drupal core.It is a big challenge to support the field type delivered by other contribute modules.
    • If it is possible, use View filter, such as event type, and expose the filter to user, in this way, the view won't load all events at the beginning. The user can filter out the events by using the exposed filter.
  • πŸ‡©πŸ‡ͺGermany 4kant

    Maybe the patch #25 in https://www.drupal.org/project/fullcalendar_view/issues/3280982 πŸ› FullviewCalendar With Repeating Smart Date Events Causing Significant Load Times Closed: won't fix is a solution.

Production build 0.71.5 2024