# Ask for performance optimization suggestions

Category: GitHub Copilot

# Ask for performance optimization suggestions

Select slow code and ask Chat to optimize it

Select a function you suspect is slow, open Chat, and ask 'optimize this for performance'. Copilot identifies O(n²) loops, unnecessary re-renders, redundant API calls, and other common bottlenecks, suggesting faster alternatives.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.