Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load time regressions #4

Open
colinxs opened this issue Jan 7, 2020 · 0 comments
Open

load time regressions #4

colinxs opened this issue Jan 7, 2020 · 0 comments

Comments

@colinxs
Copy link
Contributor

colinxs commented Jan 7, 2020

klowrey/MuJoCo.jl: 0.3s

Lyceum/MuJoCo.jl: 6.7s

Bulk of difference is due to dependency loading:

  • StaticArrays (common to both)
  • UnsafeArrays: 0.02s
  • CEnum: 0.02s
  • MacroTools: 0.32s
  • MuJoCo_jll: 2.78s
  • AxisArrays: 0.17s
  • BangBang: 0.71s

For klowrey/MuJoCo.jl:

julia> @time using MuJoCo, CEnum, MacroTools, AxisArrays, BangBang, MuJoCo_jll
  6.471298 seconds (13.87 M allocations: 693.209 MiB, 2.77% gc time)
julia> @time using MuJoCo, CEnum, MacroTools, AxisArrays, BangBang
  2.916885 seconds (6.23 M allocations: 316.192 MiB, 1.73% gc time)

Note: loading lots of packages at once is greater than sum of loading each individually, from some julia-lang Slack chat this appears to be known issue

UnsafeArrays, StaticArrays, CEnum, MacroTools are common enough that they will almost always be loaded anyways.

AxisArrays cost is minimal.

BangBang is fairly heavyweight, but half of it's load time is from it's dependency on ZygoteRules, which will typically always be loaded as well. BangBang is also pretty necesary for @set!!.

So, only room for improvement is MuJoCo_jll, which stems from GLEW_jll/GLFW_jll/Libglvnd_jll. As a result, only options are:

  1. Ditch GLEW_jll/GLFW_jll/Libglvnd_jll until fixed (can load them manually), which should yield ~3-3.5 s improvement.
  2. Leave and wait until fixed.

Might be worth checking with Elliot to get a rough timeline for when jll load times will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant