-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
I4No visible changesNo visible changesS3Minimally significantMinimally significantU4Nothing urgentNothing urgentenhancementImproving existing functionalityImproving existing functionality
Description
One of the problems with the metabase is excessive convertions of addresses/CID/OIDs to use as keys or bucket names.
The cost is non-negligible as can be seen from the benchmarks (will provide them shortly).
Describe the solution you'd like
Introduce tx-level cache containing the most frequently used values.
Converting some items to string can be done outside of the transaction, we also can reuse the same slice for creating bucket names.
type txContext struct {
tx *bbolt.Tx
addr string
cid string
oid string
bucketName []byte // preallocated bucket name
}
I have benched similar thing once, while trying it with pebble backend #619 , the result was positive. I think similar benefits are applicable to bolt.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I4No visible changesNo visible changesS3Minimally significantMinimally significantU4Nothing urgentNothing urgentenhancementImproving existing functionalityImproving existing functionality