I forget who, but I was told someone had started to work on client filtering for Damus. I shared my concept and haven’t followed up since - if we don’t see much action, I may circle back and progress the mock up toward a functional PR.

It’s mostly just Swift UI and data models so far - it’s missing the query hook to filter data. I suspect it may need a couple performance smarts, as pre-rendering is a performance sensitive area. Things like filtering based on NIP05 requires kind0 for that pubkey - so you ideally don’t want to show it, fetch kind0, match on filtered NIP-05 and then hide it.

Reply to this note

Please Login to reply.

Discussion

nice, the layout LGTM. I assumed the naive approach of filtering events after they’ve been received. actually, I wonder if that is viable after all - string matching is cheap

It worked fine for Tweetbot. Definitely my preference is filtering client side - as the the relay query results are processed.

JB55 has put a lot of effort into making events fetch and render fast. Adding filtering, will have some additional computation. Obviously more filters will mean more non-linear computation. Just need to build it and test really - no point optimising without seeing how a minimal approach goes.

At some point I envision a smarter relay query NIP drafted and can support filters or rules. It’s perhaps a bit early, while what we have largely works ok.

This was part two of the mock.