Bad performance on Windows

I’m working on a Play Framework project (2.4.11; Scala 2.11.9; sbt 0.13.16) with developers on all three main platforms. One thing we’ve noticed is that performance is consistently way worse under Windows than the other two (macOS, Linux).

The project has about 1k Java classes and 200 Scala classes; in a modern machine, a cycle of clean;update;compile takes about 60s under Linux or macOS, but almost 400s under Windows. I’ve tried adding the source folder to Windows Defender exclusions, with a noticeable but not too big effect, bringing time down to ~370s.

I’m sure this is not expected. IO performance is infamously not great on Windows, but not to that extent. I’m wondering if anyone else experienced something like this, and if not, what could I do to find out what’s wrong.

There’s a pull request that’s merged for sbt 1.x that tries to address deletion performance on Windows - https://github.com/sbt/io/pull/135

Could you isolate the performance differences of running just clean task (after running compile etc that you’d normally run to prep)?

FYI that Malwarebytes doubles my windows compile time unless it is completely turned off (exclusions don’t matter).

@eed3si9n clean takes under 1s, so that’s probably not the issue. Following @Adam’s suggestion I’ve disabled Windows Defender completely and things have improved a bit.

One tweak I’ve tried that really made a difference was stopping the Windows Search service. That alone brought the cycle down to ~180s. Still not on par with Linux, but at least it’s tolerable now.