9521582005
An instance of `CoreDbMptRef` is created for and stored in every account - when we are processing blocks and have many accounts in memory, this closure environment takes up hundreds of mb of memory (around block 5M, it is the 4:th largest memory consumer!) - incidentally, this also removes a circular reference in the setup that causes the `AristoCodeDbMptRef` to linger in memory much longer than it has to which is the core reason why it takes so much. The real solution here is to remove the methods indirection entirely, but this PR provides relief until that has been done. Similar treatment is given to some of the other core api functions to avoid circulars there too. |
||
---|---|---|
.. | ||
aristo_db | ||
aristo_db.nim | ||
aristo_rocksdb.nim |