Performance Optimization Audit
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.
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
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 Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse 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.