Este conteúdo não está disponível na sua linguagem... Então se você não entende a linguagem... bem, você pelo ou menos pode apreciar as imagens da postagem, né?

I have been dabbling with Linux and, as a Kotlin developer, it surprised me how fast compiling Kotlin on Linux is compared to Windows. At the same time, I heard about the Windows 11 Dev Drive which, supposedly, is faster than NTFS for software development. Microsoft says that Dev Drive is faster because it uses ReFS and because Microsoft Defender's Antivirus defaults to "performance mode".

So I've decided to build a Kotlin project that uses Kotlin/JVM and Kotlin/JS using ./gradlew clean build:

  • Windows (NTFS - excluded from Windows Defender)
  • Dev Drive (ReFS)
  • WSL2
  • Linux (ext4)

And the results are...

  • Windows (NTFS - excluded from Windows Defender): 26s
  • Dev Drive (ReFS): 38s
  • WSL2: 23s
  • Linux (ext4): 20s

I don't know how Dev Drive can be this slow, considering that Microsoft is targeting developers with this feature! My Dev Drive is even set up to use a partition for itself on my main NVMe SSD disk instead of using a virtual hard drive to try to extract the "maximum performance", and even then the performance is worse than NTFS.

But all hope is not lost, because Microsoft advertisement about the Dev Drive may not be 100% truthful. You can extract more performance from the Dev Drive by adding the entire disk as a exclusion in Windows Defender.

Isn't that incredibly stupid? After all, wasn't THE POINT of the Dev Drive to not need to worry about anti-virus and things like that? Oh well, after figuring that out, I've also learned that you can disable Windows Defender's filter entirely on all dev drives by using fsutil devdrv enable /disallowAv, which is cleaner than adding the entire disk to Windows Defender.

After doing that, here are the new results:

  • Windows (NTFS - excluded from Windows Defender): 26s
  • Dev Drive (ReFS - with disallowAv): 22s
  • WSL2: 23s
  • Linux (ext4): 20s

Don't forget that you need to change the GRADLE_USER_HOME to the Dev Drive, and I think you can go even further beyond by installing IntelliJ IDEA on the Dev Drive too.

While WSL2 has somewhat similar performance to Linux, IntelliJ IDEA does not seem to play well with projects hosted on a WSL2 drive if the project uses Kotlin Multiplatform, complaining about Not a valid absolute path related to KMP dependencies. (probably could be fixed by changing the .kotlin folder)