Problem
The news browse page loads slowly. The likely cause is that fetching posts pulls the full set of cached posts across every feed from Redis on every request, regardless of how many are actually shown or which filters are active — likely one Redis request per feed (see FeedManager.getAllPosts() / feeds/feedManager.ts), merged and sorted at request time.
Scope
Two concrete angles to investigate, in order:
- Fetch only what's needed: only pull as many posts as will actually be rendered on the page (pagination-aware fetching) instead of the full cached set per feed.
- Reduce request count: look into whether Upstash Redis supports batching/pipelining multiple feed lookups into a single round trip instead of issuing one request per feed.
Notes
Not yet investigated: whether the Redis client/Upstash REST API supports pipelining, and what the actual current data volume per feed is. Start with profiling to confirm the bottleneck before changing the fetch strategy.
Problem
The news browse page loads slowly. The likely cause is that fetching posts pulls the full set of cached posts across every feed from Redis on every request, regardless of how many are actually shown or which filters are active — likely one Redis request per feed (see
FeedManager.getAllPosts()/feeds/feedManager.ts), merged and sorted at request time.Scope
Two concrete angles to investigate, in order:
Notes
Not yet investigated: whether the Redis client/Upstash REST API supports pipelining, and what the actual current data volume per feed is. Start with profiling to confirm the bottleneck before changing the fetch strategy.