Issue 2293: no flicker on refretchEvents
Status:  ExportedToGithub
Owner: ----
Closed:  Aug 2015
Reported by thi...@thiagomt.com, Sep 23, 2014
Currently we have available only the refetchEvents, which destroys all the events and then trigger the ajax that catches all events and renders them all again.

This is not the best way to implement an auto update, because the events are "flickering".

The ideal would be to have an option that only UPDATE events. In other words, performs the Ajax and, according to the result, renders a new event that did not exist, update an event already rendered or removes an event that no longer exists.
Sep 25, 2014
#1 bhol...@snapappointments.com
Currently we are doing this using socket.io/node - when an event is added or changes it pushes the data to the calendar view and updates just the applicable events. Happens so fast there is no flicker. If an event is changed, the original event details are still present but the item is dropped. If a full refresh is done on the page, of course, the new data is pulled in anyway. This is a fairly new implementation and we will certainly refine it but so far it's been working quite well. In the past, we ran an auto-refresh function every 60 seconds on the calendar view.
Sep 25, 2014
#2 thi...@thiagomt.com
Excellent suggestion. 

Would you mind providing the code for me to study it? 
Thank you so much!
Oct 30, 2014
Project Member #3 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: no flicker on refretchEvents (was: Make possible or implement an autoupdate)
Status: Accepted
Labels: Type-Bug
Dec 15, 2014
#4 thi...@thiagomt.com
Hi Adam, any news on this?

I understand that this is a primary feature for a calendar.

Unfortunately refetchEvents method is not good, because it destroy the events before firing the ajax request, so the calendar is empty for all the time you take the request. What can be long for slower connections.
Mar 12, 2015
#5 diogoale...@gmail.com
Is there anything technically wrong with solving this by simply not doing destroyEvents() on the refetchEvents function? 

I just tried it and it seems to work well, updating the events without flickering. There must be some good reason behind destroyEvents() being there though, what am i missing?
Mar 18, 2015
#6 steeve.t...@gmail.com
I got the same issue with refetchevents. I need to refetch almost 150 events every 30 seconds. Calendars are shared on multiple computers and I cannot use socketIO/Node on this server. V1 refetched events very quickly. Why V2 so slow ?
Mar 25, 2015
#7 helge.sv...@gmail.com
If you comment out or remove the destroyEvents() function call inside refetchEvents() this actually fixes this problem, I played around a little bit with it and it did not seem to have any weird side-effects as far as I could see.


Aug 21, 2015
Project Member #8 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/2558

This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event.

Happy coding,
Adam
Status: ExportedToGithub