PDSampler.jl
PDSampler.jl copied to clipboard
loading time
due to dependencies, loading time is quite slow (several seconds). Would be good to check how to strip down dependencies so that only the strict minimum is loaded in order to speed up loading.
Experiments:
Current machine, full load time
julia -e 'tic(); using PDMP; toc()'
elapsed time: 7.926201809 seconds
This is outrageous. Chasing the culprit.
In PDMP.jl:
using Compat
using Klara.ess
using ApproxFun
using Polynomials:
Poly,
roots,
polyint,
polyval
julia -e 'tic(); using Compat; toc()'
elapsed time: 0.047637768 seconds
Negligible
julia -e 'tic(); using Klara.ess; toc()'
elapsed time: 1.290301332 seconds
That's pretty bad
julia -e 'tic(); using ApproxFun; toc()'
elapsed time: 6.580165969 seconds
That's downright awful.
julia -e 'tic(); using Polynomials; toc()'
elapsed time: 0.062788019 seconds
Negligible again.
Removing dependencies
- removing
Klara.ess - removing
Distributions:Beta - removing
ApproxFun
julia -e 'tic(); using PDMP; toc()'
elapsed time: 1.567161443 seconds
More informations:
- in Julia 0.5.2 it's half that time (changing Readme to reflect that for now recommended to use Julia 0.5.2 as a result)
- apparently the problem is partly known as per https://github.com/JuliaLang/julia/issues/21173