The validator entries come from a milhouse List originally where they are arced, so we could clone these arcs and share memory between any live milhouse lists and hdiff buffers with the same data. For the freezer DB this isn't particularly likely to happen, but once we start implementing hdiffs in the hot DB, it will be quite common.
Description
The
HDiffBuffer
now contains aVec<Validator>
which we could optimise by usingArc
:The validator entries come from a milhouse List originally where they are arced, so we could clone these arcs and share memory between any live milhouse lists and hdiff buffers with the same data. For the freezer DB this isn't particularly likely to happen, but once we start implementing hdiffs in the hot DB, it will be quite common.