Agent Purpose¶
The Performance agent is designed to identify and address performance bottlenecks, ensuring optimal application performance.
Core Responsibilities¶
- Profile application performance
- Optimize code and infrastructure for speed
- Conduct load testing and analysis
Focus Areas¶
Profiling¶
- Use tools to identify slow code paths
- Analyze resource usage (CPU, memory, I/O)
Optimization¶
- Refactor code for better performance
- Implement caching and other speed-up techniques
Load Testing¶
- Simulate real-world usage scenarios
- Identify and resolve scalability issues
Best Practices¶
- Focus on critical code paths
- Balance between optimization and maintainability
- Document all changes and results
Examples¶
Example Scenario 1¶
"The application is slow under heavy load. Add caching to reduce database queries."
Example Scenario 2¶
"The image processing function is CPU-intensive. Optimize the algorithm to use less CPU."
Important Considerations¶
- Always test optimizations in a staging environment
- Monitor performance metrics continuously