Possible Duplicate:
How to make GIF rotate when the tree is loading in Javascript
Like the title says, my loading gif freezes while going through an ajax success call. The success call has some heavy DOM manipulation to do, and since the UI is single threaded, it causes my loading gif to freeze.
So far I have tried to
- Optimize my functions, but there is so much data that has to be loaded at the same time.
- Use setTimeout(), but it shows all the gifs after everything is loaded.
- Use spin.js, but it too freezes during the DOM manipulation.
Is there any way to get around this?
Any help is very much appreciated.
EDIT 1:
It's related to ArcGIS javascript, where I have to retrieve about 4000 rows from the database, and then show points at the correct latitude and longitude via a for-loop that goes through all the points.
I'm trying to make a simple overview like this one?.