Hello,
I have a javascript function that changes the css display ('block', 'none') of a large number of dom nodes (>5000). I am trying to make this as fast as possible.
Will IE interrupt javascript to reflow and paint the screen, or will it wait until the javascript engine returns control to the browser? I want to avoid any extra work from the browser until all nodes have had their display set.
I noticed in JQuery's show() method, DOM operations are put in a tight loop with the comment
// Set the display of the elements in a second loop
// to avoid the constant reflow
(http://code.google.com/p/jqueryjs/source/browse/trunk/jquery/src/fx.js line 51)
Thanks,
James