Large dom performance fix

Fixes script unresponsive warnings in IE8 with huge DOMs.

Ian.