Performance articles, tutorials, and guides

In-depth articles, tutorials, and guides on Performance — covering everything from fundamentals to advanced patterns.

Memoization Pitfalls in React: When useMemo and useCallback Make Things Worse

Memoization in React is a performance optimization, not a default behavior. But many codebases use useMemo and useCallback everywhere — creating overhead, obscuring intent, and sometimes preventing the optimizations they were meant to enable. Knowing when memoization helps and when it hurts is more important than knowing the API.

Cumulative Layout Shift: Why Your Page Jumps and How to Stop It

Cumulative Layout Shift measures visual instability — the total amount of unexpected layout movement that occurs during a page's lifetime. A high CLS score means elements shift under the user's cursor right as they try to click. It is one of the most impactful Core Web Vitals for perceived quality.

Understanding Memoization in JavaScript

Memoization is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and reusing them when the same inputs occur again. This article aims to provide a clear understanding of what memoization is and how to use it in JavaScript.