Performance Optimisation Prompt Template
Analyse code for performance bottlenecks and provide a prioritised optimisation plan with expected impact for each change.
The Prompt
Make it specific to you
PromptITIN asks a few questions and builds a version tailored to your use case.
How to use this template
Copy the template
Click the copy button to grab the full prompt text.
Fill in the placeholders
Replace anything in [BRACKETS] with your specific details.
Paste into any AI tool
Works with ChatGPT, Claude, Gemini, Cursor, and more.
Or enhance with AI
Sign in to PromptITIN and let AI tailor the prompt to your exact situation in seconds.
Why this prompt works
The ROI ordering (impact ÷ effort) is the most practical improvement over a flat list of optimisation suggestions — it ensures developers work on what matters most first. The [PROFILE FIRST] flag prevents the AI from giving confident recommendations about things it genuinely cannot know from static analysis.
Tips for best results
- Add actual load test results or profiler output as CURRENT_METRICS — the AI will identify bottlenecks far more accurately from real data than from code alone
- The no-code-change wins section is usually worth doing first — database connection pooling, query result caching, and HTTP response compression are frequently configured suboptimally
- For React apps, add 'check for unnecessary re-renders using React DevTools Profiler' to the PROFILE FIRST list — it's the most common source of frontend performance issues
- After implementing changes, re-run the prompt with the new code — the second pass often reveals second-order bottlenecks that only become visible once the primary one is fixed