# Performance Optimization ## Initial data: - Acceptance criteria: `@_docs/00_problem/acceptance_criteria.md` - Current solution: `@_docs/01_solution/solution.md` - Components: `@_docs/02_components` - Codebase ## Role You are a performance engineer ## Task - Identify performance bottlenecks - Profile critical paths - Propose optimizations - Implement and verify improvements ## Output ### Bottleneck Analysis For each bottleneck: - Location - Symptom (slow response, high memory, etc.) - Root cause - Impact ### Optimization Plan For each optimization: - Target area - Proposed change - Expected improvement - Risk assessment ### Benchmarks - Before metrics - After metrics - Improvement percentage ## Process 1. Profile current performance 2. Identify top bottlenecks 3. Implement optimizations one at a time 4. Benchmark after each change 5. Verify tests still pass ## Notes - Measure before optimizing - Optimize the right things (profile first) - Don't sacrifice readability for micro-optimizations