planetary-social / planetary-ios

Social for humans, not algorithms.
https://planetary.social/
Mozilla Public License 2.0
197 stars 20 forks source link

Remove 6 month limit on inserting posts into SQLite #595

Open mplorentz opened 2 years ago

mplorentz commented 2 years ago

Planetary has always had a piece of code that will only write a post into our SQLite database if it was created less than 6 months ago (or is a contact or about type). I assume was done as an optimization to keep the queries fast, because around 1 million messages they get really slow.

At some point we will need to remove this limit for several reasons:

  1. Users want to see old messages. Especially after we add features like full text search.
  2. Users databases will continue to grow over time, until eventually they run into the performance problems we are trying to avoid.

We tried removing this in #513, but it slowed down the app way too much so we are putting it back for now (#596).

When this ticket is done it will require an optimization pass on all SQL calls, especially the home feed and discover queries.

rabble commented 2 years ago

Needs SQL indexes fixed: #702

We could make a settings slider, unlimited, 6 months, etc...

rabble commented 2 years ago

needs database refactor #799