Make log counting quicker by using muxrpc from ebt (getClock)
Opened this issue · 0 comments
cblgh commented
In #27, netsim was made to support ssb-db2 at the expense of making netsim significantly slower. The reason for slowness is that we're now streaming all the messages in each log when counting the # messages in a database.
A solution that could work in multiple implementations (go-ssb, ssb-db, ssb-db2) is to use the getClock muxrpc call. Since this call needs to be implemented if you want to sync using EBT, it is a good candidate for relying on. It would also be vastly faster, as it contains the last known sequence for each peer (it's the vector clock) a puppet has in its database.