D
D
Dmitry Roo2020-01-20 12:53:55
linux
Dmitry Roo, 2020-01-20 12:53:55

gradle. Why is building on windows so much slower?

Comparing build speeds across platforms... Benchmarking
project is known and publicly available: https://github.com/spring-projects/spring-framework
Launch options:

% java --version
openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (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
Build takes (multiple runs):
Core i7 8750H (MacBook Pro) ~3:00 minutes
Ryzen 7 2700 + Windows (Desktop) ~3:45
Ryzen 7 2700 + Linux (Desktop) ~ 2:00
those. *nix systems have a gigantic (almost 2x) advantage in build speed!
Question: Why is building on windows so much slower? Well, or why is the build on *nix systems so much faster? Any ideas how to speed up build on windows?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mayton2019, 2020-01-20
@xez

Linux creates processes faster (fork()). This is especially evident when working with console tools. And with the same tools that are ported under Windows for example. This is one reason. And the second is the file system. Linux/Ext4 is usually less expensive to maintain a huge amount of small operations than Windows/NTFS. For example, checking security attributes on Linux is a bitmask check. In Windows - a little more action.
In addition, of course, there may be other differences in the implementation of java under Windows that I do not know.

T
tiroman, 2020-01-20
@tiroman

There are some individuals who claimed that this is a lie, I authoritatively stated that this is so, I also conducted a bunch of experiments in an attempt to at least equalize the performance of gradle on Linux, it didn’t work ... And I will say that all intellij products work faster under Linux, not only gradle, I couldn’t fully understand the reasons and didn’t find a solution, so I’ve been sitting on Linux for almost 5 years
. tried both open jdk and oracle and tried a lot of things to swindle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question