-
Notifications
You must be signed in to change notification settings - Fork 100
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
ChainRulesCore dependency causes 4x load time regression #310
Comments
@ChrisRackauckas, this is a bit unfortunate. Why can't ChainRulesCore be a more lightweight dependency? Don't we just need a package defining a few functions that we can overload? |
We are working on it. |
It wasn't a complaint, really, I was just wondering if ForwardDiff might not profit from a lightweight abstract interface. :-) But I had indeed not realized that the load time of ForwardDiff had regressed recently. |
The quite recent addition of ChainRulesCore (#238) causes a 4x load time regression for this package. This is quite unfortunate since this package is a very common dependency. This has the effect that e.g. complaints are made upstream of slow loading packages (for example JuliaDiff/ForwardDiff.jl#518).
Current master:
Without ChainRulesCore:
There is a bit of irony here in that ForwardDiff (or rather DiffRules) already has derivatives defined for SpecialFunctions (and its tests pass perfectly fine without the ChainRulesCore definitions). Is there any way you could make the people that don't need the (big) ChainRulesCore overhead able to avoid it?
In addition, ChainRulesCore does a bunch of quite exotic stuff (https://github.com/JuliaDiff/ChainRulesCore.jl/blob/63de708a85611f4a65604bec582c71b53d6d5d43/src/ruleset_loading.jl#L84-L126), for example adding hooks that run at every package load (which call into reflection of all things) and it seems unwanted to have such things in such a core dependency as SpecialFunctions.jl is.
The text was updated successfully, but these errors were encountered: