title: Creating a temp file is incredibly slow
body: <p>Any reason why a call to</p>
  
  <pre><code>File.createTempFile("prefix", ".suffix", new File("C:\\");
  </code></pre>
  
  <p>might take 40-50 seconds to complete?</p>
  
  <p>Update:
  I knocked up a little test harness that benchmarks creating 100 test files on C:\ and the default tmp folder. Specifying "C:\" is consistently ~0.9ms slower than just leaving it on the default, allowing for JVM warmup time, GC pauses etc. (No clue why this should be, but its not a problem.)</p>
  
  <p>Not a single run suffered from anything like that level of delay, which suggests the app is doing something else first which is causing the problem.</p>
  
  <p>Using Suns JVM 1.6.0_12 client.</p>