|
|
Videos was slow because the grid read from the feed's page of posts:
the feed cache holds 30, so after every reload the grid re-crawled the
relays, ten posts a step, each post first waiting (up to 8 s) for its
avatar, pictures and link cards — none of which the grid shows.
- Each feed now keeps a media index (IndexedDB, src/media-cache.js): the
posts carrying pictures and those carrying clips, 400 of each, and how
far back it has looked. The grid and pager read from it; a reload
paints them at once.
- The crawl reads older posts straight into the index, 100 at a time,
without the readiness wait and without touching the feed's own page;
it resumes from where it stopped. The bottom of a feed is looked for
again after a day. Curated feeds still page the usual way.
- A tile's first frame is kept (a small JPEG in the Cache API, when the
host lets its pixels be read) and painted as a picture from then on: in
the grid, as the pager's poster and the feed's.
- Probe results kept for 2000 clips (was 600).
- Forgetting a wallet wipes the index and the frames.
tools/feed-media-cache-test.js
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ULQZS9MQa6iAsXnrJUD9Du
|