Skip to content

Reduce Redis fetch time on news browse page (single giant request per load) #89

Description

@kevin8181

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:

  1. 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.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions