versioninfo()
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads: 1 on 20 virtual cores
julia1.9.0 system image using Pycall will cause recompilation:
I set up precompiled execution code
glmakie_precompile.jl
@time using GLMakie
@time lines(0:1:10, rand(11))
@time heatmap(rand(10,10))
@time volume(rand(50,100,150))
Create a system image
create_sysimage(:GLMakie, sysimage_path="MyJuliaSysimage.dll", precompile_execution_file="glmakie_precompile.jl" )
Then start the image:
julia -J MyJuliaSysimage.dll --startup-file=no
It can be seen that it is activated, but
Onceusing PyCall, it will cause the function to be recompiled:
include("glmakie_precompile.jl")
0.990671 seconds (1.11 M allocations: 77.773 MiB, 2.09% gc time, 99.92% compilation time: 100% of which was recompilation)
1.924587 seconds (4.41 M allocations: 294.875 MiB, 4.77% gc time, 99.44% compilation time: 89% of which was recompilation)
0.137899 seconds (218.10 k allocations: 14.614 MiB, 8.12% gc time, 95.18% compilation time: 86% of which was recompilation)
0.948697 seconds (2.18 M allocations: 150.802 MiB, 4.64% gc time, 97.70% compilation time: 97% of which was recompilation)
julia1.9.0 system image using Pycall will cause recompilation: I set up precompiled execution code
glmakie_precompile.jl
Create a system image
create_sysimage(:GLMakie, sysimage_path="MyJuliaSysimage.dll", precompile_execution_file="glmakie_precompile.jl" )
Then start the image:julia -J MyJuliaSysimage.dll --startup-file=no
use
It can be seen that it is activated, but Once
using PyCall
, it will cause the function to be recompiled: