Performance Detective
Finds the real bottleneck in slow code or queries, estimates impact and proposes fixes ranked by effort.
The prompt
Remixed ·Fill in the variables
The prompt above updates live. Nothing leaves your browser.Remix it
One-click variations. Stack them, then copy.
Why this prompt works
It refuses to optimise blind: the "measure first" step keeps you from rewriting code that was never the bottleneck. The effort-and-risk table turns analysis into a prioritised backlog.
Framework: Chain-of-Thought. Asks the model to reason through explicit steps before answering.
Example
Illustrative, not a real model outputExample input
- [CODE_OR_QUERY_TYPE]
- Django view
- [SYMPTOM_AND_NUMBERS]
- order list page takes 4.2 s with 500 orders
- [CODE_AND_PROFILE]
- for o in Order.objects.all(): o.customer.name ...
What a good answer looks like (abridged)
How to use it
- Fill in 3 variables below (or in the prompt) with specific details.
- Paste it into DeepSeek (also works in ChatGPT, Claude, Gemini).
- Check the result against the prompt’s rules and ask for a revision where it falls short.
DeepSeek tips
- Reasoning models do best with a clear goal and constraints; skip “think step by step”, they already do.
- Ask for the final answer in a fixed format so it is easy to scan after the reasoning.
Common mistakes
- Leaving [VARIABLES] unfilled or vague ("my business") instead of specific ("a 3-person Calgary bakery").
- Deleting the constraints to make the prompt shorter; they are what prevent generic output.
- Accepting the first answer. Reply with what to fix and ask for a revision.
Guide: Promptnic template.
Frequently asked questions
Which AI model works best with the Performance Detective prompt?+
It is tuned for DeepSeek and also works in ChatGPT, Claude, Gemini, Grok. Reasoning models do best with a clear goal and constraints; skip “think step by step”, they already do.
How do I use this prompt?+
Copy it, replace the 3 [VARIABLES] (code or query type, symptom and numbers, code and profile) with your details, then paste it into DeepSeek. You can fill the variables on this page and copy the finished version.
Is this prompt free to use?+
Yes. Every prompt on Promptnic is free to copy, adapt and use in personal or commercial work. A link back is appreciated, not required.
Why does this prompt work?+
It refuses to optimise blind: the "measure first" step keeps you from rewriting code that was never the bottleneck. The effort-and-risk table turns analysis into a prioritised backlog.
Related prompts
Strict JSON Extractor With Self-Check
Pulls structured data out of messy text into an exact JSON schema, with nulls instead of made-up values.
Root-Cause Bug Hunter (Hypotheses Before Patches)
Forces the model to isolate the failure, rank root causes and write a regression test before it touches your code.
SQL Query Writer With Schema Check
Writes correct SQL from plain English, states assumptions about your schema and explains performance.
Error Message Translator
Explains a cryptic error in plain English, lists likely causes for your setup and gives the fix commands.
Regex Builder With Test Cases
Builds a regular expression from plain English and proves it with matching and non-matching examples.
Senior Code Reviewer: Bugs First, Nits Last
A code review prompt that prioritises correctness and security over style, with severity labels and concrete fixes.