try-gmt
try-gmt copied to clipboard
Improve the speed for loading the GMT.jl package
Loading the GMT.jl package (using GMT) is very slow (~10 s) for the first time, because Julia needs to precompile the GMT.jl package. It would be better to precompile the package when building the docker image, so that the package is already precompiled when users run using GMT.
As I understand it, running julia -e "using GMT" may do the precompiling.
@joa-quim Is it correct? Is there a way to precompile all Julia packages?
That is the subject of one of biggest discussions in Julia (on how to improve compile times). When one run it locally it takes that time only the first time and caches the result. Next time it takes ~1 s but it seems the docker is not saving the cached compiled code. There are packages that allow compiling and and adding to the main Julia image, but this is a process that is more complicated and would require a kind of custom Julia build.
Tried to run julia -e "using GMT" in PR #10, but it doesn't work.
Yes, looks like the cache is trashed every the VM is closed.