NfNitLoop / feoblog

A distributed, cryptographically-verifiable blog / social network
Other
71 stars 4 forks source link

Improve user feed query #75

Open NfNitLoop opened 2 years ago

NfNitLoop commented 2 years ago

The current query just walks down the items table by timestamp, filtering for follow matches.

It seems to perform slowly, though, taking up to 400ms on my DigitalOcean server. Maybe SQLite isn't optimizing it like I thought.

The best way to scale may be to pull the list of follows, then walk each individually and merge them in the server. (Unless I can accomplish something like that with SQLite's recursive queries?)

NfNitLoop commented 2 years ago

Implemented this in 036b04555e317b361e80883c6f7a85d249bbd6ef

NfNitLoop commented 2 years ago

I'll close this when this feature makes it into the next release.