Issue 02 · June 2026
Measure before you optimize
Your guess about what is slow is probably wrong.
From Mushfiq Alam Sami <mushfiq9912@gmail.com>
Hey, put the memoization down.
Every developer has a favourite thing they think is slow. Most of the time the real problem is somewhere else, and a minute of measuring says so.
Tip of the issue
Watch for long tasks
Pages feel slow when the main thread is busy for more than about 50 milliseconds at a time. The browser can tell you exactly when that happens.
Drop this into the console, click around, and you get a list of the moments your page froze.
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(Math.round(entry.duration) + "ms", entry)
}
}).observe({ type: "longtask", buffered: true })Once you know which interaction is slow, the Performance tab in DevTools shows which function caused it.
Small challenge
Find your slowest click
Record a Performance profile while using the most interactive page you have built. Find the longest task, name the function behind it, and decide whether it needs fixing or just deserves a comment.
Hint: sometimes the answer is that it is fine.
Worth your time
- PerformanceObserver on MDN
The API used in the snippet above and the entry types it understands.
- Interaction to Next Paint (INP)
The metric that turns long tasks into a single number you can track.
Project idea
A freeze logger
Write a tiny script that sends long-task reports from real visitors to a text file. After a week you will have a list of the pages that actually hurt, ranked by evidence.