Use this skill when a web application feels slow, janky, or unresponsive. Cursor's built-in browser has CPU profiling tools that capture real call stacks and timing data.
The
MCP provides
and
tools that capture Chrome DevTools-format CPU profiles. Profile data is written to
as both raw JSON and a human-readable summary.
-
Ensure the app is running — start the dev server if it isn't already running.
-
Navigate to the slow page:
Tool: browser_navigate
Arguments: { "url": "http://localhost:3000/slow-page" }
-
Start profiling:
Tool: browser_profile_start
-
Reproduce the slow interaction — use browser tools to trigger the slow behavior:
- Click buttons, scroll, type in inputs, navigate between pages
- Use , , to interact
- Wait a few seconds for the interaction to complete
-
Stop profiling:
Tool: browser_profile_stop
This writes two files to
:
cpu-profile-{timestamp}.json
— raw Chrome DevTools profile
cpu-profile-{timestamp}-summary.md
— human-readable summary
-
Analyze the results — read both files. Key things to look for in the raw JSON:
- — how many samples hit each function
profile.nodes[].callFrame.functionName
— the function names
- — total number of samples collected
Cross-reference with the summary to identify:
- Functions consuming the most CPU time
- Unexpected re-renders or layout thrashing
- Expensive third-party library calls
- Synchronous operations blocking the main thread
-
Suggest fixes — based on the profile data, recommend specific optimizations:
- Memoize expensive computations
- Debounce rapid event handlers
- Move heavy work to a Web Worker
- Lazy-load components or routes
- Virtualize long lists