Database open time is really high

Thanks for working on this.

The server with the dataset runs with 12 HDD configured with a software raid 5.
I get this:

original opening time:

time="2019-01-10T14:40:23Z" level=info msg="opened database" elapsed=5m47.719094755s package=db

with your branch:

badger 2019/01/10 14:03:57 INFO: All 397 tables opened in 3m0.336s

it’s already a substantial gain in my case so that’s great.

While opening the database I’ve seen reads top at around 700mib/s but this array is capable of reading at more than 1gib/s (with a straight cat foo > /dev/null) so I’m not sure if I’m being i/o bound right now.

Here’s the graph of disk throughput, the blue line is the raid array (negative means reads).

First peak is badger on master, second is badger with your branch and last is just cat.

Note that since I opened the issue the dataset changed too, it’s bigger now. Here’s the new badger info output.