Global Feed Post Login
Replying to Avatar Mike Dilger ☑️

Ok I'm going to do the following. I hope it is okay:

1) One subscription for the main feed, which is usually several hundred notes long. Every time a new note comes in, but no more often than some minimum time, I will rewrite it adding the new IDs, and including a since=now so as not to replay everything again.

2) One subscription for alternative feeds such as viewing a person's post history, viewing a particular thread, or viewing your inbox. This will be rewritten as the notes flow in for that feed just like for the main feed, but the filter will not have any "since=now" limitation, practically guaranteeing many repeats. This subscription will be unsubscribed as soon as they browse back out of that alternative feed.

Both subscriptions will be limited to reaction/zap/delete event kinds.

Avatar
Vitor Pamplona 2y ago

Amethyst does it similarly but subscribes to visible events only. As the user scrolls and stops, the app waits 100ms from the last scroll change, and refreshes all filters.

Reply to this note

Please Login to reply.

Discussion

Avatar
Mike Dilger ☑️ 2y ago

That seems very reasonable, and even though you would be rewriting the filter frequently, the subscription is always very short. Maybe I'll do that instead. Thanks.

Avatar
Vitor Pamplona 2y ago

relays hate it but it's better than hitting the limit in filter size

Thread collapsed
Avatar
Cameri🐦‍🔥 2y ago

This is the best approach IMO.

Thread collapsed
Thread collapsed