-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
type:testTesting improvementsTesting improvements
Description
Branch: chore/dashboard-perf
Priority: High
Parent Epic: #145
Type: Task
Description
Conduct thorough performance testing of the dashboard system to ensure it meets performance targets. Profile stats aggregation overhead, API response times, and frontend rendering. Optimize any bottlenecks found.
Acceptance Criteria
- Stats aggregation adds <5% overhead to indexing
- API endpoints respond in <100ms for typical repos
- Dashboard loads in <2s on 10k file repository
- Charts render smoothly (60fps)
- Memory usage is reasonable (<500MB for large repos)
- Performance benchmarks documented
- Optimization recommendations for large repos
Technical Requirements
Benchmarks to Run:
-
Indexing Performance
- Measure indexing time before/after stats aggregation
- Test with various repo sizes (100, 1k, 10k, 50k files)
- Measure memory usage
- Profile hotspots with Node.js profiler
-
API Performance
- Measure
/api/statsresponse time - Test with various repo sizes
- Test concurrent requests
- Measure memory usage per request
- Measure
-
Frontend Performance
- Lighthouse scores (Performance, Accessibility)
- Time to first paint
- Time to interactive
- Chart rendering performance
- Bundle size analysis
Optimization Strategies:
-
Stats Aggregation
- Use efficient data structures (Map vs Object)
- Incremental aggregation (no post-processing)
- Limit memory usage (streaming where possible)
- Cache computed values
-
API Layer
- Implement response caching
- Add ETag support
- Compress responses (gzip)
- Lazy load large datasets
-
Frontend
- Code splitting for charts
- Lazy load Tremor components
- Memoize expensive calculations
- Virtualize long lists
- Optimize bundle size
Performance Targets:
- Indexing overhead: <5%
- API response: <100ms (p95)
- Dashboard load: <2s
- Charts render: <500ms
- Memory usage: <500MB for 10k files
Testing:
# Indexing performance
hyperfine 'dev index /path/to/large/repo' --warmup 1
# API performance
wrk -t2 -c10 -d30s http://localhost:3000/api/stats
# Frontend performance
lighthouse http://localhost:3000 --viewDocumentation:
- Create
apps/dashboard/PERFORMANCE.md - Document benchmarks
- Document optimization techniques
- Provide guidance for large repositories
Files to Create:
apps/dashboard/PERFORMANCE.mdbenchmarks/dashboard-perf.shbenchmarks/results.md
Files to Modify:
- Optimize based on profiling results
- Add performance comments to critical paths
Metadata
Metadata
Assignees
Labels
type:testTesting improvementsTesting improvements