Performance Optimization Audit

Developer Toolscursor-vs-windsurffile_or_component_pathcomponent_typewhat_it_does

Both editors can read component code and identify performance patterns. The 'don't suggest micro-optimizations' instruction keeps the output actionable. The categorized checklist ensures nothing major is missed.

Prompt
Audit {{file_or_component_path}} for performance issues.

Context: This is a {{component_type}} that {{what_it_does}}. Users report it feels {{performance_complaint}}.

Check for:

**React-specific** (if applicable):
- Unnecessary re-renders: missing memo, useMemo, useCallback
- State updates that could be batched
- Components that should be lazy-loaded
- Large lists missing virtualization

**Data fetching**:
- Waterfall requests that could be parallel
- Missing caching / stale-while-revalidate
- Over-fetching (fetching more data than displayed)
- N+1 query patterns

**Bundle**:
- Large imports that could be tree-shaken or dynamically imported
- Dependencies with smaller alternatives

**Runtime**:
- Expensive computations on every render
- DOM measurements forcing layout thrashing
- Animation jank (layout properties instead of transform/opacity)

For each issue:
- Impact: High / Medium / Low
- Current code snippet
- Optimized code snippet
- Estimated improvement (be specific: "reduces re-renders from N to 1" or "cuts bundle by ~40KB")

Prioritize by impact. Don't suggest micro-optimizations that save less than 1ms.

Variables to customize

{{file_or_component_path}}{{component_type}}{{what_it_does}}{{performance_complaint}}

Why this prompt works

Both editors can read component code and identify performance patterns. The 'don't suggest micro-optimizations' instruction keeps the output actionable. The categorized checklist ensures nothing major is missed.

What you get when you save this prompt

Your workspace unlocks powerful tools to iterate and improve.

AI OPTIMIZE

AI Optimization

One-click improvement with structure analysis and pattern suggestions.

VERSION DIFF

Version History

Track every edit. Compare versions side-by-side with word-level diffs.

ORGANIZE
Development
Code Review
Testing
Marketing

Folders & Tags

Organize your library with nested folders, tags, and drag-and-drop.

MCP
$ npm i -g @promptingbox/mcp
Claude · Cursor · ChatGPT

Use Everywhere

Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.

Your prompts, organized

Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.