Forum Academy Marketplace Showcase Pricing Features

Full Calendar loading performance


I think I’m not the only one (by reading messages on the forum) who believes the performance of the Full Calendar plugin is not ideal, in terms of loading the initial events.

My calendar instance takes almost 10 seconds to load aprox 400 events taking place in 1 years time.

This might be normal based on this number of events and time frame, but I think the performance could be optimised by retrieving from the database just the events that will be visible in the current calendar view.

For example, say that the calendar is in Monthly view (so today June 7th it is showing days from May 28th to July 8th), if the calendar had a state variable holding the date range of the visible days, we could just query the database to get events taking place on that date range, instead of all the events in the table.

Then if the user clicked on buttons to move the calendar forward or backwards, the calendar would re-fetch events based on the new visible date range.

Does this make sense and improve performance? Could it be implemented?



I know this is old, but this came up recently for me. Posting for posterity’s sake.

I had a test user that reached 10,000 records (because of an unrelated accidental workflow loop that never ended), and it made the Calendar take 20s+ to load. I resolved the issue that created so many records, but it also made me realize that when a typical user has been on our app for years (one can hope!), it’s going to create a problem.

Now, instead of loading all Calendar events, for the Calendar’s data source I use “search for [thing]” with 2 constraints:

  1. date field < Calendar’s current date range:end
  2. date field > Calendar’s current date range:start

That way, no matter how many events there are, the Calendar will only load events if a user looks at that month/week/day. This not only makes the Calendar load super fast now, but it also reduces the capacity it’s using up, because often users are only looking at 1 or 2 months and don’t need all events loaded in.