Open mzabaluev opened 3 months ago
A minor thing to consider while changing all the object type pointers:
impl MoveStorage for &dyn DbReader
could be more ergonomically implemented on the unsized dyn DbReader
instead.
This issue is stale because it has been open 45 days with no activity. Remove the stale
label or comment - otherwise this will be closed in 15 days.
bump
Performance issue
In aptos-storage-interface, the
DbReaderWriter
uses twoArc
fields, seemingly only to achieve dynamic dispatch viaDbReader
andDbWriter
for the same object: https://github.com/aptos-labs/aptos-core/blob/11033f4dd27144908ad9832dd49dc86fe261561f/storage/storage-interface/src/lib.rs#L549This seems unnecessary; a helper trait could combine both vtables without the overhead of an extra reference, furthermore you could use
Box<dyn DbReaderWriter>
if you don't need atomic reference counting at all: