Diagnose high CPU usage
Identify tight loops, excessive polling, and missing memoization causing high CPU usage. Suggests concrete fixes with profiler guidance.
Preview
Copy prompt
My [Language] service is consistently using [X%] CPU under normal load. Here is the most relevant code and any profiler output I have already collected: [Paste]. Identify patterns that are causing unnecessary computation, such as tight polling loops, missing memoization of expensive calculations, synchronous blocking operations on the event loop, or repeated object allocations inside hot paths. Suggest concrete, measurable fixes for each issue found.
More
Debugging
Prompts
