@cryptotaxi247 / kubo / commits / ff490a6d5

perf(core/datastore) disable snappy compression

Brian Tiger Chow committed Oct 30, 2014 at 02:25 UTC ff490a6d5284933591fef53e4183317b3989d51c
1 file changed +5 -1
core/datastore.go
+5 -1
@@ -8,6 +8,7 @@ import (
8 ktds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/keytransform"
9 lds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb"
10 syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
11 + ldbopts "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/opt"
12
13 config "github.com/jbenet/go-ipfs/config"
14 u "github.com/jbenet/go-ipfs/util"
@@ -43,5 +44,8 @@ func makeLevelDBDatastore(cfg config.Datastore) (ds.ThreadSafeDatastore, error)
44 return nil, fmt.Errorf("config datastore.path required for leveldb")
45 }
46
46 - return lds.NewDatastore(cfg.Path, nil)
47 + return lds.NewDatastore(cfg.Path, &lds.Options{
48 + // TODO don't import ldbopts. Get from go-datastore.leveldb
49 + Compression: ldbopts.NoCompression,
50 + })
51 }