Gradle. Why the windows build is much slower?

To draw a comparison of speed of build on different platforms...
Project for performance tests known and available to the public: https://github.com/spring-projects/spring-framework
Launch options:
% java-version
openjdk 11.0.5 2019-10-15
AdoptOpenJDK OpenJDK Runtime Environment (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)

./gradlew clean build-x test --no-build-cache
Assembly is (according to the results of multiple runs):
on 8750H Core i7 (MacBook Pro) ~3:00 minutes
at Ryzen 7 2700 + Windows (desktop) ~3:45
at Ryzen 7 2700 + Linux (desktop) ~ 2:00

ie *nix systems in huge (almost 2 times) the advantage of speed build!

Question: Why the windows build is much slower? Well, or why the build on *nix systems much faster? Any ideas how to speed up the build on windows?
April 4th 20 at 12:59
2 answers
April 4th 20 at 13:01
Solution
Linux creates faster processes (fork()). This is particularly evident in the console tulsani. And with the same tulsani who ported under Windows for example. This is one reason. And the second is the file system. Linux/Ext4 usually less costly to maintain the large number of small operations than Windows/NTFS. For example, to check security attributes in Linux - this is a test bitmask. In Windows - a little more action.

Everything can of course be other differences in the implementation of java for Windows which I do not know.
It seems that in this task, loses Ext4 NTFS/HFS+
I tried to use a Ramdrive for the project - on windows, build time decreased to 3 minutes, but on the Mac there is no effect (3 minutes and ramdrive and ssd) - jacquelyn_Corkery commented on April 4th 20 at 13:04
Ramdrive is an expensive pleasure. Usually memory is used efficiently. But if you have something under him reserve other apps automatically get. Ramdrive is certainly an option. But the intermittent and manually controlled. After Assembly you must not forget to repay. - Wava_Rutherford commented on April 4th 20 at 13:07
@Wava_Rutherford, ramdrive is, of course, just as an experiment. It seems that the assumption about ext4 vs ntfs - right. The use of the ramdrive in their daily work - is doubtful. - jacquelyn_Corkery commented on April 4th 20 at 13:10
@jacquelyn_Corkery, again, in Linux the reverse situation :) tmpfs based on the work pile system partitions. - Bryce.Bashirian11 commented on April 4th 20 at 13:13
April 4th 20 at 13:03
There are some individuals who claimed that it was a lie, I authoritatively stated that this is so, I also did a bunch of experiments to try at least to equal the performance grade on Linux, did not work... And I say that all products intellij run faster under Linux, not only grant, the reasons I could not understand and no solution found, so almost 5 years sitting on Linux

PS I tried open jdk and Orlowski and many things tried to nasambit
Was there a level playing field? Gradle from there .config where is defined the maximum number of worker processes --max-workers. I think they determine the speed of Assembly lot-modular project. And gradle is very tricky and, whenever possible, tries to compile when I can. For example run the unit test may not cause a complete cycle of kompillyator. Ie it may not have been a question of Windows vs. Linux but rather one config against another. - Wava_Rutherford commented on April 4th 20 at 13:06
@Wava_Rutherford, one and the same project, empty, from the standard set, setup, Studio default, I even tests and measurements were done, Laura one smart guy has proved )) - Kassandra_Beier commented on April 4th 20 at 13:09
So I'm not talking about the project and about the gradle configuration for a specific OS. View gradle.properties in installation GRADLE_HOME and in the project directory. Possible differences. - Wava_Rutherford commented on April 4th 20 at 13:12
@Wava_Rutherford, I wrote the settings Studio the default the same, gradl too - Kassandra_Beier commented on April 4th 20 at 13:15
Try to run on both configurations build with the option-debug. And without parallelism. Gonna be a long pastina operations. Further, for the two configurations, it is necessary to compare time. I think in the log it will be obvious that any particular operation is long fulfilled. - Wava_Rutherford commented on April 4th 20 at 13:18
@Wava_Rutherford, so to me it's not so important )) I under Linux feel comfortable - Kassandra_Beier commented on April 4th 20 at 13:21
Now, Yes. At the time, also switched to Linux solely because of this.

And stuck there forever )) - domingo_Kun commented on April 4th 20 at 13:24

Find more questions by tags LinuxJavamacOSWindowsGradle