I have a JS app that does a lot of calculations. I'm having trouble keeping the browser responsive. My current solution is to take apart loops that last a long time and make them into functions that call themselves with setTimeout(). (As far as I can tell, you HAVE to do this to keep the browser from alerting the user that a script is unresponsive and perhaps should be shut down). Is that what other people are doing?
Trying to have smooth animations and jQuery effects during the processing just doesn't work out. The only thing I can think of is to stop processing, start the effect and use the effect callback to restart the processing. Again, is this what other people are doing? Anyone doing something more clever? I'm assuming there is no priority system that can keep the UI stuff "above" the processing stuff.