ipld-eth-server/vendor/github.com/ipfs/go-datastore/autobatch
2019-12-02 13:24:49 -06:00
..
autobatch.go update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00
README.md update dependencies to work with update eth-block-extractor 2019-12-02 13:24:49 -06:00

autobatch

Autobatch is an implementation of go-datastore that automatically batches together writes by holding puts in memory until a certain threshold is met. This can improve disk performance at the cost of memory in certain situations.

Usage

Simply wrap your existing datastore in an autobatching layer like so:

bds := NewAutoBatching(basedstore, 128)

And make all future calls to the autobatching object.

License

MIT