Files
eranos/src/hooks
shakespeare.diy ab1ec4503c perf: adopt Agora's feed loading optimizations
Three key changes stolen from ../agora that significantly speed up
the feed:

1. eoseTimeout: 500 on NPool — resolves relay queries as soon as any
   relay sends EOSE instead of waiting for all relays to finish.
   This was the single biggest latency improvement.

2. Batch author prefetching (useAuthors hook) — collects all unique
   pubkeys from the feed and fetches their kind-0 profiles in a
   single relay query, then seeds the individual ['author', pubkey]
   cache.  Previously each NoteCard called useAuthor independently,
   firing N separate relay queries in parallel.

3. placeholderData on useFeed and useEventStats — keeps showing
   previous data while refetching instead of flashing loading
   skeletons, eliminating visual flicker on tab switches and
   background refetches.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-17 18:13:42 -06:00
..
2026-02-16 16:54:01 -06:00