On Mon, 2 Sep 2024 07:20:50 GMT, Johan Vos <j...@openjdk.org> wrote:

> When building webkit, the perl script in 
> `modules/javafx.web/src/main/native/Tools/Scripts/build-webkit` will check 
> for a `-j` argument in `$makeArgs`. If that doesn't exist, it will default to 
> `numberOfCPUs()`.
> This PR passes the `NUM_COMPILE_THREADS` from `build.gradle` to the 
> `build-webkit` script. When not setting `NUM_COMPILE_THREADS` explicitly,it 
> will default to the number of CPU's as well, hence it will have the same 
> behavior as without this PR.
> When setting `NUM_COMPILE_THREADS` explicitly, the provided number will be 
> used by cmake as well now.

Btw, I ran another CI build with the `NUM_COMPILE_THREADS=1` workaround for Mac 
removed, and the build times are good again. In fact, the x64 build runs even 
faster than before -- possibly because WebKit build defaults to a lower number 
than num_processors, and it happens to be 12 on that x64 build system.

Here are the updated numbers:

OS / Arch|Current|This PR|PR + don't limit num threads on macOS
---------|-------|-------|-------
macOS / aarch64|13m:41s|56m:36s|13m:43s
macOS / x64|28m:30s|2h:24m:52s|23m:01s

I should also add that the Linux and Windows build times are largely unaffected 
by this PR (which is good). They do run slightly faster with your patch than 
current, but the percentage gain is small.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1554#issuecomment-2327094270

Reply via email to