Apia saysProfile performance with DevTools — find slow functions, layout thrash, and long tasks.
The browser's Performance panel records a timeline of scripting, rendering, and painting so you can spot bottlenecks: long tasks blocking the main thread, layout thrashing (interleaved DOM reads/writes), and excessive re-renders. Measure before optimizing — guesses are usually wrong. performance.now() times code precisely.
Power-ups you unlock
DevTools Performance panel records a timeline
Spot long tasks, layout thrash, repaints
Measure before optimizing (don’t guess)
performance.now() for precise timing
Legacy Larry attacks — common mistakes
Optimizing without measuring first
Interleaving DOM reads and writes (forced reflow)
Premature micro-optimizations over real bottlenecks
Boss battleTime a loop with performance.now() and reason about what DevTools would show.