general

Performance Guidelines

General performance best practices

Details

Language / Topic
_UUniversal
Category
Performance

Rules

balanced
- Profile before optimizing — measure, don't guess. Premature optimization wastes time and adds complexity.
- Optimize the critical path first. 90% of performance comes from 10% of the code.
- Cache expensive computations and database queries — use appropriate TTLs and invalidation strategies based on data freshness requirements.
- Cache expensive computations and API calls. Invalidate caches explicitly — stale data is a bug.
- Use lazy loading for non-critical resources and code paths.
- Debounce user-input-driven operations (search, resize, scroll).
- Prefer pagination or virtual scrolling for large data sets — never render 10,000 DOM nodes.