I have a piece of javascript that loops a number of times calculating stuff and it is supposed to output some text to screen every iteration, but instead it goes away for a long time and flushes everything at once to screen.
There probably are known tricks to get the thing to iteratively update rather than hanging onto the output then flushing, problem is I don't know them!
Any help appreciated.
UPDATE: I altered my code to use setTimeout as some of you suggested but I am afraid it's not helping. I still I won't see anything till the processing is complete. I also tried increasing the timeout but the effect is still the same (by increasing the timeout between each iteration it obviously takes more time but still the browser goes unresponsive). Any idea?