Why Nostr? What is Njump?
2024-04-12 20:03:17
in reply to

fiatjaf on Nostr: Ask me questions directly and I can answer them. The code creates a set of query ...

Ask me questions directly and I can answer them.

The code creates a set of query specs from a filter -- i.e. if the filter specifies an author and a kind, we return one spec for traversing the 'pubkeyKind' index at the specified key range, if the filter specifies 4 authors and 2 kinds, then we return 8 specs for traversing the 'pubkeyKind' index in all these different combinations.

Then we gather all the results in a heap and take them in sorted order and return them through the channel.

The heap part can probably be improved, let me know if you have something better. Maybe sacrifice a little bit of strict ordering to get some performance?
Author Public Key
npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6