@kristoffer.carlsson , @PatrickHaecker , I made now a brief test:
- on a laptop that is used only for office purposes, thus should have a clean Windows 10
- Julia was uninstalled, all its traces cleaned, then computer restarted, then Julia was installed using the standalone official installer.
- Before PackageCompile was executed, I only added “PackageCompiler” and Distributions"
- For the test I used the module of “Juliastic”: Juliastic/src/Juliastic.jl at main - donovaly/Juliastic - Codeberg.org
- for the precompilation, this file: Juliastic/build/precompilation.jl at main - donovaly/Juliastic - Codeberg.org
- the command for the Julia REPL is:
lib_input_path= "D:\\Julia\\Juliastic"
cd(lib_input_path)
using PackageCompiler
lib_name= "Juliastic"
lib_output= joinpath(lib_input_path, "CompilationResult")
precomp_file= joinpath(lib_input_path, "build", "precompilation.jl")
lib_header= joinpath(lib_input_path, "build", lib_name * ".h")
create_library(lib_input_path, lib_output;
incremental= false, force= true, filter_stdlibs= true, lib_name= lib_name,
precompile_execution_file= precomp_file,
header_files= [lib_header])
At first Julia 1.10.9
- The CPU has 12 threads, so I set JULIA_NUM_THREADS to 12.
result: compilation works, total time 363 seconds, here a screen shot with all details. Note the warnings about threads.
1.11.5
- JULIA_NUM_THREADS to 12
result: compilations hands (the bug why we have this discussion), but see the screenshot with the compilation times:
Step 1: 79% longer
Step 2: 30% longer
1.11.5 with patch
- JULIA_NUM_THREADS to 12
- I applied Fix hanging system image creation if multiple threads are set by PatrickHaecker · Pull Request #1042 · JuliaLang/PackageCompiler.jl · GitHub
result: compilation works, total time 593 seconds, here a screen shot with all details. Note that there are now no warnings about threads.
But the compilation time increased by 63 %
So the patch makes it compiling, but the performance loss with 1.11.x is severe.