thor on Nostr: my Nostr indexer runs queries to look up profiles, contact lists and relay lists it ...
my Nostr indexer runs queries to look up profiles, contact lists and relay lists it doesn't have. normally, a contact list also contains a relay list, but this is non-standard, so that's 3 objects in total.
to speed things up and avoid hitting relay rate limits, i collect pubkeys to query in batches of 70. but that third object - the relay list - is very rare, so i end up running a lot of useless queries. the volume of queries would be a lot smaller if i just ignored it.
it doesn't break anything but it feels a bit wasteful of resources.
i suppose what i could do is keep a list - per connected relay - of objects i have already requested in that session. after all, if the object does appear later on, i should expect the relay to announce that, so it doesn't need further querying.
Published at
2023-03-16 01:58:33Event JSON
{
"id": "115b5404047f2f4c392f732463be6854dcf04c270e45ad18cca9712c8c2a600b",
"pubkey": "c708943ea349519dcf56b2a5c138fd9ed064ad65ddecae6394eabd87a62f1770",
"created_at": 1678931913,
"kind": 1,
"tags": [],
"content": "my Nostr indexer runs queries to look up profiles, contact lists and relay lists it doesn't have. normally, a contact list also contains a relay list, but this is non-standard, so that's 3 objects in total.\n\nto speed things up and avoid hitting relay rate limits, i collect pubkeys to query in batches of 70. but that third object - the relay list - is very rare, so i end up running a lot of useless queries. the volume of queries would be a lot smaller if i just ignored it.\n\nit doesn't break anything but it feels a bit wasteful of resources.\n\ni suppose what i could do is keep a list - per connected relay - of objects i have already requested in that session. after all, if the object does appear later on, i should expect the relay to announce that, so it doesn't need further querying.",
"sig": "2609ab92d9273e21c7aa06191b920e9a8d8b2860ff981cb9ec1df39261af59653047711db68ae5877ac567faed6a2630ffcb9748433f876bfdc6d31675220f78"
}