Performance Bottleneck Profiler
Profiles a pasted code block for real performance issues, using its execution frequency, typical data size, and your current pain point to prioritize what actually matters. - Flags O(n²) loops, N+1 queries, missing indexes, and memory/caching gaps - Ranks each finding High/Medium/Low impact with a suggested fix and expected gain - Focuses on the 20% of changes likely to deliver 80% of the speedup - Confirm suggestions with real profiling before shipping
Analyze this code for performance issues: {{code}} Context: - This runs {{execution_frequency}} - Data size: {{data_size}} - Current pain point: {{pain_point}} Find: 1. Time complexity issues (O(n²) operations, unnecessary loops) 2. Database problems (N+1 queries, missing indexes, over-fetching) 3. Memory issues (large allocations, leaks, caching opportunities) 4. I/O bottlenecks (blocking calls, sequential when could be parallel) 5. Quick wins (simple changes with big impact) For each issue: - Impact: High / Medium / Low - Current behavior - Suggested fix with code - Expected improvement Focus on the 20% of changes that give 80% of the gains.