Performance · TL;DR

1 min read
Mid-level1 min read
Rapid overview

TL;DR

  1. Minimize DOM Access - Cache DOM references
  2. Batch DOM Changes - Use fragments, cssText, classes
  3. Debounce/Throttle Events - For scroll, resize, input
  4. Use Event Delegation - One listener instead of many
  5. Lazy Load Resources - Load only what's needed
  6. Cache Results - Memoize expensive computations
  7. Optimize Loops - Cache length, use appropriate methods
  8. Parallel Async Operations - Use Promise.all()
  9. Avoid Memory Leaks - Remove listeners, clear timers
  10. Measure Performance - Use Performance API to identify bottlenecks

See also