Performance

Performance is the difference between an extension users keep installed and one they remove after a day. Chrome users are increasingly aware of resource consumption, and the browser itself now surfaces per-extension memory and CPU usage in the task manager. An extension that leaks memory or pins a CPU core will get flagged, reviewed poorly, and uninstalled.

Memory management deserves the most attention. Service workers in Manifest V3 are designed to be ephemeral, but sloppy code can keep them alive indefinitely or re-spawn them too frequently. Content scripts that inject into every page carry their own memory cost, multiplied across every open tab. Articles here cover practical techniques: cleaning up event listeners on navigation, using WeakRefs for cached data, and structuring storage access to avoid loading everything into memory at once.

CPU profiling helps you find non-obvious bottlenecks. A content script running a DOM mutation observer on a busy page can consume surprising CPU. The DevTools performance panel works for extensions, but you need to know where to look. Guides below walk through profiling workflows specific to extension contexts, including service workers and popup lifecycle events.

Lazy loading and code splitting are increasingly relevant as extensions grow in complexity. Loading your entire extension bundle when the user only needs a toolbar icon click handler is wasteful. Manifest V3 makes dynamic imports practical for content scripts, and these articles show how to structure your build pipeline to take advantage of that.

The goal is an extension that users forget is even running.