jb55 on Nostr: On the plane I came up with an algorithm that does the following: given a set of ...
On the plane I came up with an algorithm that does the following:
given a set of filters, find all filters that are redundant. It pretty simple, you just determine if a filter is a subset of any other filter in the set, and then you prune those.
Example: everything is a subset of {}, the filter that matches everything, so this algorithm could take a list of 100 filters, and if {} was present it would only return that 1 filter.
This is useful for notedeck, as you would only need to open the minimal number of subscriptions remotely, while still having granular local filters active on nostrdb.
Will write up this algo soon, i have some of the code done already.
gm nostr
given a set of filters, find all filters that are redundant. It pretty simple, you just determine if a filter is a subset of any other filter in the set, and then you prune those.
Example: everything is a subset of {}, the filter that matches everything, so this algorithm could take a list of 100 filters, and if {} was present it would only return that 1 filter.
This is useful for notedeck, as you would only need to open the minimal number of subscriptions remotely, while still having granular local filters active on nostrdb.
Will write up this algo soon, i have some of the code done already.
gm nostr