Skip to content

Commit

Permalink
perf(core/datastore) disable snappy compression
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Tiger Chow committed Oct 30, 2014
1 parent 461e5a3 commit ff490a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
ktds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/keytransform"
lds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb"
syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
ldbopts "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/opt"

config "github.com/jbenet/go-ipfs/config"
u "github.com/jbenet/go-ipfs/util"
Expand Down Expand Up @@ -43,5 +44,8 @@ func makeLevelDBDatastore(cfg config.Datastore) (ds.ThreadSafeDatastore, error)
return nil, fmt.Errorf("config datastore.path required for leveldb")
}

return lds.NewDatastore(cfg.Path, nil)
return lds.NewDatastore(cfg.Path, &lds.Options{
// TODO don't import ldbopts. Get from go-datastore.leveldb
Compression: ldbopts.NoCompression,
})
}

0 comments on commit ff490a6

Please sign in to comment.