calendar icon indicating copy to clipboard operation
calendar copied to clipboard

The calendar screen is displayed slowly

Open zhiqi-23 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

When I prepare a calendar table with more than 1000 events(not a recurring event), open it in month view, the current month has 360 events, an average of 12 events per day, and then click the calendar button, it takes about 6 seconds to display the calendar screen. Nextcloud version: 24.0.3. Calendar app version: 3.5.4 and 3.5.7. image2023-8-21_17-16-10

Describe the solution you'd like

I want to improve the display speed of the calendar screen.

Describe alternatives you've considered

No response.

Additional context

No response.

zhiqi-23 avatar Aug 22 '23 03:08 zhiqi-23

Can you share your script on how to fill the tables so I can reproduce?

miaulalala avatar Aug 24 '23 12:08 miaulalala

@miaulalala schedule.zip

zhiqi-23 avatar Aug 29 '23 01:08 zhiqi-23

Merci!

miaulalala avatar Aug 29 '23 07:08 miaulalala

@miaulalala Is there a way to fix that. I've the same problem with NC29. I'm using around 6 different calendars. If I switch to another month or reloading the whole page, the calendar takes 7 seconds to load.

niclasheinz avatar Jun 29 '24 05:06 niclasheinz

@miaulalala Is there a way to fix that. I've the same problem with NC29. I'm using around 6 different calendars. If I switch to another month or reloading the whole page, the calendar takes 7 seconds to load.

We could cache the DAV responses maybe? The issue is that for every calendar the following queries are run (you can observe them in your browser):

POPFIND on the DAV endpoint which gives us the principal PROPFIND on principal to get the collection of calendars For each calendar a PROPFIND for the entire timespan of the view to get the VCALENDAR (which, underlying is doing a select on oc_calendar_objects to build the VCALENDAR response)

Then the frontend has to parse the whole VCALENDAR into each VEVENT and slot it into the calendar grid.

So it's simply a lot of data to process.

I think there's already some caching for the DAV backend if I'm not mistaken, but fullcalendar struggles with lots of events. Maybe @st3iny has some idea?

miaulalala avatar Jul 08 '24 10:07 miaulalala

Then the frontend has to parse the whole VCALENDAR into each VEVENT and slot it into the calendar grid.

Thanks for the reply, @miaulalala! Is there a way to improve performance with cronjobs or something else?

niclasheinz avatar Jul 08 '24 10:07 niclasheinz

No unfortunately not, since this is purely how many requests are sent from the frontend to the backend and then how many events are returned and need to be parsed to be displayed.

miaulalala avatar Jul 08 '24 12:07 miaulalala

And how does the professional hosting provider speed up the NC calendar?

niclasheinz avatar Jul 08 '24 13:07 niclasheinz