Issue 257: Animated loading image problem
Status:  Released
Owner: ----
Closed:  Aug 2013
Reported by bibendus...@gmail.com, Dec 22, 2009
When huge amounts of events are loaded the browser freezes and my loading
image stops animating until all events are displayed.
I used the standard loading trigger to show and display a div containing my
loading gif.

To fix this problem I tried to modify the JSON callback function to hide
"loading_area1" containing the image and to show "loading_area2" containing
the simple text "Displaying data..."
Here is the code, some hide/show parts are redundant for testing purposes:

events: function(start, end, callback) {  			   
	$.getJSON(
		"ajax/request_calendario.php", {
			_: data.getTime(),
			start: start.getTime(),
			end: end.getTime(),        
		},
		
		function(result) { 
			/* Image should disappear leaving only the message "Displaying data..." */
			$("#loading_area1").hide(); 
			//alert("WAIT ALERT"); 
			callback(result);
		}
	);
}, 

loading: function(bool) {                            
	if (bool) {                     
		$('#loading_area1').show();
		$('#loading_area2').show();
	} else {               
		$('#loading_area1').hide();         
		$('#loading_area2').hide();
	}
}

Unfortunately "loading_area1" stays displayed until the end of events
displaying (staying freezed as I said before).
If I try to uncomment the alert function all goes OK. Does it exist a way
to insert a small delay before using the callback? Can I use setTimeout()
inside a JSON call? 

Dec 30, 2009
Project Member #1 adamrs...@gmail.com
hi. i think this problem will go away once i make some big optimizations for the next
version: https://code.google.com/p/fullcalendar/issues/detail?id=178

so far, i have been able to speed things up a lot. stay tuned...
Jan 7, 2010
#2 bibendus...@gmail.com
Love it ;)
Feb 4, 2010
#3 bibendus...@gmail.com
You can close this ticket, with version 1.4.4 it's much faster!
Feb 6, 2010
Project Member #4 adamrs...@gmail.com
sweet
Status: Fixed
Aug 13, 2013
Project Member #5 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Released