disable vid reuse compaction (#2276)
The current implementation cannot be used practically since it causes several full reallocations of the whole free list per deletion - it needs to be reimplemented, or the chain cannot practically progress beyond ~2.5M blocks where a lot of removals happen. Co-authored-by: tersec <tersec@users.noreply.github.com>
This commit is contained in:
parent
9f879406f3
commit
ef864ba167
|
@ -300,8 +300,13 @@ proc delSubTreeImpl(
|
||||||
db.layersPutVtx(VertexID(1), wp.vid, leaf)
|
db.layersPutVtx(VertexID(1), wp.vid, leaf)
|
||||||
db.layersResKey(VertexID(1), wp.vid)
|
db.layersResKey(VertexID(1), wp.vid)
|
||||||
|
|
||||||
# Squeze list of recycled vertex IDs
|
# Squeeze list of recycled vertex IDs
|
||||||
db.top.final.vGen = db.vGen.vidReorg()
|
# TODO this causes a reallocation of vGen which slows down subsequent
|
||||||
|
# additions to the list because the sequence must grow which entails a
|
||||||
|
# full copy in addition to this reorg itself - around block 2.5M this
|
||||||
|
# causes significant slowdown as the vid list is >1M entries long
|
||||||
|
# See also EIP-161 which is why there are so many deletions
|
||||||
|
# db.top.final.vGen = db.vGen.vidReorg()
|
||||||
ok()
|
ok()
|
||||||
|
|
||||||
|
|
||||||
|
@ -393,8 +398,13 @@ proc deleteImpl(
|
||||||
db.layersPutVtx(VertexID(1), wp.vid, leaf)
|
db.layersPutVtx(VertexID(1), wp.vid, leaf)
|
||||||
db.layersResKey(VertexID(1), wp.vid)
|
db.layersResKey(VertexID(1), wp.vid)
|
||||||
|
|
||||||
# Squeze list of recycled vertex IDs
|
# Squeeze list of recycled vertex IDs
|
||||||
db.top.final.vGen = db.vGen.vidReorg()
|
# TODO this causes a reallocation of vGen which slows down subsequent
|
||||||
|
# additions to the list because the sequence must grow which entails a
|
||||||
|
# full copy in addition to this reorg itself - around block 2.5M this
|
||||||
|
# causes significant slowdown as the vid list is >1M entries long
|
||||||
|
# See also EIP-161 which is why there are so many deletions```
|
||||||
|
# db.top.final.vGen = db.vGen.vidReorg()
|
||||||
ok(emptySubTreeOk)
|
ok(emptySubTreeOk)
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue