0fa3e58a83d358bcc0f38479aed611886f486db7
The app was firing an excessive number of concurrent REQs, causing relays to return "too many concurrent REQs" errors. Root causes and fixes: 1. **Batch event stats** (biggest win): Created `useBatchEventStats` hook that fetches interaction stats for ALL visible feed items in a single relay query instead of 2 queries per NoteCard. For a 15-item feed this reduces ~30 concurrent REQs to just 1. Results are seeded into the individual `['event-stats', id]` cache for instant resolution. 2. **Merged dual queries**: Both `useEventStats` and `useEventInteractions` were firing 2 parallel queries (e-tag + q-tag). Merged each into a single query using multiple filter objects (relay handles as OR). 3. **Reduced limits across the board**: - useEventStats: limit 200+50 → 50+20 (single query) - useEventInteractions: limit 500+100 → 50+20 (single query) - useTrendingTags: limit 200 → 50 - useReplies: limit 100 → 50 - useProfileFeed PAGE_SIZE: 30 → 20 - useStreamPosts/useStreamKind subscription limit: 100 → 0 Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
Description
Languages
TypeScript
95.7%
Java
1.5%
JavaScript
0.9%
Swift
0.9%
CSS
0.5%
Other
0.4%