🐛
Performance Bottleneck Finder
Identify and fix performance issues in slow code
prompt template
This code is running slowly. Help me find and fix the performance bottleneck. **Context:** [WHAT_THE_CODE_DOES — e.g., "renders a list of 10,000 items", "processes uploaded CSV files"] **Current performance:** [HOW_SLOW — e.g., "takes 8 seconds to load", "API response time is 3s"] **Target performance:** [GOAL — e.g., "under 500ms", "instant feel"] **Code:** ``` [PASTE_SLOW_CODE_HERE] ``` Analyze this code and: 1. **Identify bottlenecks** — point to specific lines/patterns causing slowness 2. **Explain why** each bottleneck is slow (Big-O analysis if relevant) 3. **Provide optimized version** with the fix applied 4. **Quantify improvement** — estimated performance gain and why 5. **Suggest profiling** — how to measure the before/after to verify Consider: unnecessary re-renders, N+1 queries, missing indexes, unbatched operations, synchronous blocking, memory allocation patterns.
How to Use This Prompt
- 1Copy the prompt template above
- 2Paste into Claude, ChatGPT, or Cursor
- 3Replace [bracketed placeholders] with your specific project details
- 4Iterate on the AI output to refine and customize the results
More Debugging Prompts
Related debugging templates from the vault
🐛
Network Request Waterfall Analyzer
Use this prompt to network request waterfall analyzer with AI assistance
Beginnerdebuggingnetwork
🐛
Stack Trace Decoder and Fixer
Use this prompt to stack trace decoder and fixer with AI assistance
Intermediatedebuggingstack-trace
🐛
Systematic Bug Diagnosis
Get structured help diagnosing a bug you cannot figure out
Beginnerdebuggingtroubleshooting
🐛
Systematic Memory Leak Hunter
Systematically identify and fix memory leaks in a production application using heap snapshots and allocation tracking
Advanceddebuggingmemory-leak
You Might Also Like
Prompts from other categories that share similar tags
🗄️
DatabasePRO
SQL Query Optimizer
Optimize slow SQL queries with explain analysis
Shared:optimizationperformance
⚡
Performance
React Rendering Performance Fix
Fix unnecessary re-renders and optimize React component performance
Shared:performanceoptimization
⚡
Performance
Next.js Performance Optimization
Optimize a Next.js application for Core Web Vitals and loading speed
Shared:performanceoptimization
⚡
Performance
Core Web Vitals Optimization Audit
Analyze and fix Core Web Vitals issues for better SEO and UX
Shared:performanceoptimization
Keep Exploring the Vault