Count only the person's own feeds in the feed list (#165)
The traces #164 added showed feed_list as nearly all of GET /api/feeds, and in it the item count at 184-316 ms, about 70% of the request: it counted every item of every feed in the database, 1534 feeds, for someone reading 146, on every feed list and every live update of one. The file count did the same over every file row, 37-50 ms. Both now join the person's subscriptions, as the unread count already did, and so read only their feeds' rows, through the entries key and the enclosures_entry index, both on feed_id first. The Directory also reads feed_list, for every feed's title and artwork, and uses no count; a feed the person does not read is still listed, with none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- The feed list loads faster: it counts the items and files of your own feeds, not of every feed on the server.
|
||||
- Downloading or deleting a file the server no longer has answers "not found" instead of a server error.
|
||||
- A feed's page in the Directory, and subscribing from it, no longer wait while the whole Directory is put together to check that the one feed is in it.
|
||||
- The feed list, and each live update of it, no longer asks the database for a group's title once for every feed in the group.
|
||||
|
||||
Reference in New Issue
Block a user