About
The Python Performance Optimization skill provides a comprehensive framework for diagnosing and fixing efficiency issues in Python applications. It guides developers through the full optimization lifecycle, from high-level CPU profiling with cProfile and py-spy to granular line-by-line analysis and memory leak detection. By implementing proven patterns such as generator expressions, slotted classes, and caching strategies, this skill helps transform slow scripts into high-performance production systems. It is particularly useful when scaling data pipelines, reducing infrastructure costs, or improving the responsiveness of web services.