Email Loading Architecture
Server-side filtering with diff/merge and composite indexes
Browser
React Query
Filter params
API Layer
Edge Function
Check cache
Cache
30s TTL
Composite idx
Supabase
PostgreSQL
Diff/Merge
Only patch changed rows instead of replacing entire list
🗃
Composite Indexes
user_id + folder + date index for 60x faster queries
🕒
Rate-Limited Sync
30s polling interval prevents API quota exhaustion