···11 dbm "github.com/cometbft/cometbft-db"
12 abcitypes "github.com/cometbft/cometbft/abci/types"
13 "github.com/cosmos/iavl"
014 "github.com/palantir/stacktrace"
15 "github.com/samber/lo"
16 "tangled.org/gbl08ma.com/didplcbft/dbadapter"
017 "tangled.org/gbl08ma.com/didplcbft/plc"
18 "tangled.org/gbl08ma.com/didplcbft/store"
19 "tangled.org/gbl08ma.com/didplcbft/transaction"
···42// store and plc must be able to share transaction objects
43func NewDIDPLCApplication(treeDB dbm.DB, indexDB dbm.DB, clearData func(), snapshotDirectory string) (*DIDPLCApplication, *transaction.Factory, plc.PLC, func(), error) {
44 mkTree := func() *iavl.MutableTree {
45- return iavl.NewMutableTree(dbadapter.Adapt(treeDB), 500000, false, iavl.NewNopLogger(), iavl.AsyncPruningOption(false))
00046 }
4748 tree := mkTree()
···11 dbm "github.com/cometbft/cometbft-db"
12 abcitypes "github.com/cometbft/cometbft/abci/types"
13 "github.com/cosmos/iavl"
14+ "github.com/klauspost/compress/zstd"
15 "github.com/palantir/stacktrace"
16 "github.com/samber/lo"
17 "tangled.org/gbl08ma.com/didplcbft/dbadapter"
18+ "tangled.org/gbl08ma.com/didplcbft/dbadapter/zstddict"
19 "tangled.org/gbl08ma.com/didplcbft/plc"
20 "tangled.org/gbl08ma.com/didplcbft/store"
21 "tangled.org/gbl08ma.com/didplcbft/transaction"
···44// store and plc must be able to share transaction objects
45func NewDIDPLCApplication(treeDB dbm.DB, indexDB dbm.DB, clearData func(), snapshotDirectory string) (*DIDPLCApplication, *transaction.Factory, plc.PLC, func(), error) {
46 mkTree := func() *iavl.MutableTree {
47+ // Using SpeedDefault appears to cause the processing time for ExecuteOperation to double on average
48+ // Using SpeedBetterCompression appears to cause the processing time to double again
49+ // By using SpeedFastest we seem to give up on like 5% size reduction, it's not worth using the slower speeds
50+ return iavl.NewMutableTree(dbadapter.AdaptWithCompression(treeDB, zstd.SpeedFastest, zstddict.PLCZstdDict), 500000, false, iavl.NewNopLogger(), iavl.AsyncPruningOption(false))
51 }
5253 tree := mkTree()