- Updated service template structure in `ARCHITECTURE.md` and `README.md` for clarity and usability. - Enhanced bilingual documentation across skills, increasing the number of available skills from 15 to 25. - Added new sections on event-driven architecture, inter-service communication, and performance optimization. - Improved formatting and removed outdated references to streamline the documentation experience.
2.0 KiB
Tối Ưu Hiệu Suất (Performance Optimization)
Performance optimization patterns for GoodGo microservices including database query optimization, memory leak detection, profiling, connection pooling, and caching strategies.
Các patterns tối ưu hiệu suất cho GoodGo microservices bao gồm tối ưu database queries, phát hiện memory leaks, profiling, connection pooling, và caching strategies.
Tổng Quan
Performance optimization patterns help identify and fix performance bottlenecks, optimize database queries, detect memory leaks, and improve overall application performance.
Các patterns tối ưu hiệu suất giúp xác định và sửa các nút cổ chai hiệu suất, tối ưu database queries, phát hiện memory leaks, và cải thiện hiệu suất ứng dụng tổng thể.
Khi Nào Sử Dụng
Use this skill when optimizing performance, profiling applications, or detecting bottlenecks.
Sử dụng skill này khi tối ưu hiệu suất, profiling ứng dụng, hoặc phát hiện bottlenecks.
Các Patterns Chính
Database Query Optimization / Tối Ưu Database Queries
// EN: Avoid N+1 queries
// VI: Tránh N+1 queries
const users = await userRepository.findAll({
include: { orders: true }, // EN: Single query / VI: Single query
});
Memory Profiling / Memory Profiling
// EN: Monitor memory usage
// VI: Giám sát memory usage
const profiler = new MemoryProfiler();
profiler.start();
Best Practices / Thực Hành Tốt
- Use indexes, avoid N+1 queries / Sử dụng indexes, tránh N+1 queries
- Monitor memory usage / Giám sát memory usage
- Cache frequently accessed data / Cache dữ liệu thường truy cập
Skills Liên Quan
- Caching Patterns - Caching strategies / Chiến lược caching
- Observability & Monitoring - Monitoring / Giám sát
Tài Nguyên
- Skill Source:
.cursor/skills/performance-optimization/SKILL.md