JS Performance: 10 Commandments

  1. Don’t touch the DOM
  2. Cache DOM reference in local vars
  3. Use selectors API
  4. Cahce the length when looping collections
  5. Update the DOM offline
  6. Batch style changes
  7. Don’t ask for layout info excessively
  8. Minimize reflow areas
  9. Use event delegation
  10. Don’t touch the DOM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s