title: How to I prevent creation of new MongoDB databases from slowing down my tests?
body: <p>Before each of my functional tests, I drop the test database and "recreate" it by setting up the indexes again. This is causing every small test to take more than a second.</p>
  
  <p>In the log, these lines show up:</p>
  
  <pre>2015-01-27T17:24:38.129+0100 [initandlisten] connection accepted from anonymous unix socket #4 (1 connection now open)
  2015-01-27T17:24:38.141+0100 [conn4] dropDatabase test starting
  2015-01-27T17:24:38.153+0100 [conn4] removeJournalFiles
  2015-01-27T17:24:38.170+0100 [conn4] dropDatabase test finished
  2015-01-27T17:24:38.171+0100 [FileAllocator] allocating new datafile /home/tomas/mongodb/data/test.ns, filling with zeroes...
  2015-01-27T17:24:38.908+0100 [FileAllocator] done allocating datafile /home/tomas/mongodb/data/test.ns, size: 16MB,  took 0.736 secs
  2015-01-27T17:24:38.908+0100 [FileAllocator] allocating new datafile /home/tomas/mongodb/data/test.0, filling with zeroes...
  2015-01-27T17:24:38.914+0100 [FileAllocator] done allocating datafile /home/tomas/mongodb/data/test.0, size: 64MB,  took 0.005 secs</pre>
  
  <p>Notice that allocating a new data file for the database "took 0.736 secs". Is there any way I can reduce or avoid that?</p>
  
  <p>I tried using <code>--noprealloc</code>, but it made no difference.</p>