Initial commit

This commit is contained in:
Michael-A-Sloan committed 2026-08-03 11:06:11 -04:00
commit 97fcc33283
50 files changed
+3211

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
---
description: Performance — avoid N+1, cache wisely, measure before optimizing
alwaysApply: false
---
# Performance
- Measure before optimizing. Profile hot paths; do not guess bottlenecks.
- Fix N+1 queries: use eager loading, joins, or batch fetches.
- Cache expensive reads with explicit TTL and invalidation strategy.
- Lazy-load heavy modules and routes not needed on initial page load.
- Paginate large lists — never load unbounded datasets into memory.
- Debounce search inputs and resize handlers (typically 200–300ms).
- Compress and resize images. Serve modern formats (WebP, AVIF) where supported.
- Avoid blocking the main thread with heavy sync work — use workers or server-side processing.
- Set appropriate HTTP cache headers for static assets.