Performance Tip 1 - Batch Updates

The slow method invokes the HTML parser each time the innerHTML property is set. To improve performance, a string can be built which is then assigned to the innerHTML property.

Click the buttons to see the difference in performance.

Slow -  

Fast -  
© 2007 Microsoft Corporation. All rights reserved. Terms of use.