Prompt·Performance and scale·P02
Steps that wait for no reason
Finds steps that wait for each other to finish when they could run at the same time.
Prompt
Find all hot paths where independent asynchronous operations run sequentially. Establish which can safely run concurrently without violating ordering, rate limits, or transaction boundaries.
- What it returns
- Each chain with the operations, why they are independent, and a before/after timing on a realistic input.
- Skip it when
- Paths that run once a day or already finish in a few milliseconds.
- Changes
- Changes nothing
- Sessions
- One session
- Tools
- Repository; a timing script to measure the result afterward.
- Watch for
- Agents wrap awaits in Promise.all without noticing they share one database transaction or hit a rate-limited API. Check transactions, rate limits and pool sizes before changing anything.
- Also called
- Sequential asynchronous work
Skills it uses
Related prompts
- Parallel work with no limitPromptFinds work run in parallel with no limit, which can swamp the database connections or an outside service.
- Code that relies on lucky timingPromptFinds code that only works because things usually happen in the right order.
- Reproduce, measure, proveThinking promptUse it in the second session, after a read-only investigation found a real problem.
More in Performance and scale.