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

Slow loading time #1151

Closed
jebej opened this issue May 29, 2020 · 7 comments
Closed

Slow loading time #1151

jebej opened this issue May 29, 2020 · 7 comments

Comments

@jebej
Copy link

jebej commented May 29, 2020

OrdinaryDiffEq now takes ~10s to load, mostly taken up by DiffEqBase + ForwardDiff, FiniteDiff.

julia> @time using DiffEqBase
  4.237307 seconds (11.94 M allocations: 688.936 MiB, 3.81% gc time)

julia> @time using ForwardDiff, FiniteDiff
  3.776792 seconds (9.31 M allocations: 472.495 MiB, 1.59% gc time)

Separately, the packages load ~2s faster, meaning there probably is a lot of invalidation happening in DiffEqBase.

julia> @time using DiffEqBase
  4.340304 seconds (11.94 M allocations: 688.958 MiB, 3.80% gc time)
julia> @time using ForwardDiff, FiniteDiff
  1.762233 seconds (4.85 M allocations: 293.860 MiB, 2.32% gc time)
@jebej
Copy link
Author

jebej commented May 29, 2020

@ChrisRackauckas I can't see where Zygote is being loaded in DiffEqBase, do you mean ZygoteRules?

@ChrisRackauckas
Copy link
Member

Separately, the packages load ~2s faster, meaning there probably is a lot of invalidation happening in DiffEqBase.

Or it's the @requires portion.

@ChrisRackauckas I can't see where Zygote is being loaded in DiffEqBase, do you mean ZygoteRules?

Yes, I think it's just ZygoteRules, so it seems like it avoids the known load time issues with Zygote.

@jebej
Copy link
Author

jebej commented May 29, 2020

I can't seem to identify any one package in DiffEqBase, it just looks like all of them are contributing. Maybe loading the package vs versions would make it easier to troubleshoot. It's also possible that it didn't jump from 5s to 10s and instead that gradually happened over time.

@ChrisRackauckas
Copy link
Member

FWIW, I made sure we got a fix into Julia v1.6 which should improve inference and compile times a lot: JuliaLang/julia#35976 so it's worth checking how things are on the nightly.

@ChrisRackauckas
Copy link
Member

If it helps a lot, we can beg for it to go into v1.5.

@ChrisRackauckas
Copy link
Member

it was like 24 for me on v1.4, and then:

julia> @time using OrdinaryDiffEq
 12.086512 seconds (15.86 M allocations: 928.801 MiB, 2.80% gc time)

on v1.5, so v1.5 is about 2x faster for me!

@ChrisRackauckas
Copy link
Member

This has been steadily improving. We can follow it in the other compilation and latency issues.

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

2 participants