I have a long running function. Which iterates through a large array and performs a function within each loop.
longFunction : function(){ var self =
Is there anything better?
If you’re OK with it working only in modern browsers – then you should look into “Web Workers”, that let you execute JS in the background.
https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers