jumartin / Calendar

A set of views and controllers for displaying and scheduling events on iOS
MIT License
704 stars 203 forks source link

App crashes laggy when there are lot of events #26

Open bobongski opened 8 years ago

bobongski commented 8 years ago

Hi love your calendar by the way. Is there a way that the scroll will not be laggy? When the events reaches 200 in a single day when scrolling its laggy.

jumartin commented 8 years ago

Hi, With the EventKit controllers, events are loaded in the background to prevent blocking the main thread. But I guess one reason for the laggy behavior when you deal with a lot of events would be the cell layout calculations (in MGCAllDayEventsViewLayout and MGCTimedEventsViewLayout). They should also be done in the background, but that might be more difficult to implement...

gklka commented 8 years ago

Same here. Reloading a day with more than 3-4 events causes serious lag in scrolling. Reloading events from a background thread does not work.

gklka commented 8 years ago

A recorded a video: http://gk.lka.hu/x/calendarlib_lag.mov

gklka commented 8 years ago

I have continued investigating the issue. It appears that -reloadEventsAtDate: is realoading the full view not only the given date. (I was logging out every -dayPlannerView:viewForEventOfType:atIndex:date: call, and it seems all of the on-screen views get this call even when the day is not reloaded which they belong to.)

MadhuriSatpute commented 8 years ago

Hi, I am studying calendar lib to use in my project. I just want to use its planner view to show my events but I am not able to insert any event on that. Each time it shows me different errors. I want to insert event for start date as current date and end as the next day. Please help.

HoangLeD13CN5 commented 6 years ago

Hi, I also encountered a similar problem. gklka, please show me fix this bug. Thanks you.