Repository navigation
Conversation
Every caller runs the inflation IO under its own config, so timeout, wait and cancellation are per caller and hypercore dedups the fetches. Decoded blocks land in slots on ptr.inflating shared by all callers, so the first to wake decodes and a late caller only fetches what is still missing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
This risks parallel walks of the tree to inflate the node but most the actual work is shared so the cost should be minimal. It also respects the 'wait' option that is difficult to handle with a simple lock as proposed in #94. Seems like a good idea to me. |
|
I ran this through |
|
I also ran this with a large database and tested memory usage. It is comparable to |
caolan-tether
left a comment
There was a problem hiding this comment.
Looks good to me. I believe @lejeunerenard also wants to take a look before merging.
Every caller runs the inflation IO under its own config, so timeout, wait and cancellation are per caller and hypercore dedups the fetches. Decoded blocks land in slots on ptr.inflating shared by all callers, so the first to wake decodes and a late caller only fetches what is still missing.