claude is thoughtfully adding a proper LRU cache for the pubkey index as well so repeated lookups over a small cluster of events will stay in memory and not even call the database engine. i figured badger would probably do this to some extent automatically but probably an explicit LRU cache should be there for especially your use case but just to cut down the second iteration required for event fetches on at least the pubkeys/ptags
the ones for e tags will always require a second iteration of the event tables, which can actually mean iterating three separate tables, or maybe it's only two, as it has a "small event" table which inlines them into the key table avoiding a second (and usual) value table iteration to fetch the event data.
should be a good fit with adding WoT stuff to amethyst
Login to reply