PDSampler.jl icon indicating copy to clipboard operation
PDSampler.jl copied to clipboard

loading time

Open tlienart opened this issue 8 years ago • 3 comments

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.

tlienart avatar Jul 29 '17 10:07 tlienart

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.

tlienart avatar Jul 30 '17 08:07 tlienart

Removing dependencies

  • removing Klara.ess
  • removing Distributions:Beta
  • removing ApproxFun
julia -e 'tic(); using PDMP; toc()'
elapsed time: 1.567161443 seconds

tlienart avatar Jul 30 '17 09:07 tlienart

More informations:

  1. 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)
  2. apparently the problem is partly known as per https://github.com/JuliaLang/julia/issues/21173

tlienart avatar Jul 30 '17 10:07 tlienart