Is this really true? I can imagine 1.11 being slower in itself, but I don’t think anything in the PackageCompiler process should use threads (except a part of the very last step in outputting the sysimage and I am not sure that even uses the number of julia threads). If you turn off threading, does 1.10 also become 40% slower?
Could you explain what part of PackageCompiler you think gets faster with your threads environment variable?
I just tested myself and didn’t notice a difference (on 1.10):
# Without threads
julia> using PackageCompiler
julia> ENV["JULIA_NUM_THREADS"]
"1"
julia> Threads.nthreads()
1
julia> @time create_app("examples/MyApp", "MyAppCompiled"; force=true)
...
150.910366 seconds (1.92 M allocations: 151.919 MiB, 0.01% gc time, 0.28% compilation time)
# With threads
julia> using PackageCompiler
julia> ENV["JULIA_NUM_THREADS"]
"10"
julia> Threads.nthreads()
10
julia> @time create_app("examples/MyApp", "MyAppCompiled"; force=true)
...
148.749071 seconds (3.82 M allocations: 291.721 MiB, 0.03% gc time, 0.28% compilation time)