You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the way this is done is we identify the garbage and store all the deref aka remove operations in a Vec till after all the columns are iterated. That definitely takes more memory than if we'd store those in a CidHashSet and schedule removals batch by batch.
I'm unsure this really needs to be done, as we won't have all that much garbage for it to matter for the current use-cases. Perhaps this could safely be ignored. This would also require some profiling to see exactly how much memory can be saved here, as we have to take what ParityDB does internally into account too.
Summary
It all boils down to having one big batch scheduled for removal at the same time vs a more light-weight storage and smaller batch removal, in order to be able to reduce the memory footprint.
The text was updated successfully, but these errors were encountered:
Overview
Currently the way this is done is we identify the garbage and store all the
deref
aka remove operations in aVec
till after all the columns are iterated. That definitely takes more memory than if we'd store those in aCidHashSet
and schedule removals batch by batch.Here's the code in question:
forest/src/db/parity_db.rs
Lines 340 to 365 in 43aeca5
I'm unsure this really needs to be done, as we won't have all that much garbage for it to matter for the current use-cases. Perhaps this could safely be ignored. This would also require some profiling to see exactly how much memory can be saved here, as we have to take what ParityDB does internally into account too.
Summary
It all boils down to having one big batch scheduled for removal at the same time vs a more light-weight storage and smaller batch removal, in order to be able to reduce the memory footprint.
The text was updated successfully, but these errors were encountered: