-
Notifications
You must be signed in to change notification settings - Fork 28
Add debug log for monitoring @require time
#107
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
Conversation
|
Beautiful! |
Codecov Report
@@ Coverage Diff @@
## master #107 +/- ##
==========================================
+ Coverage 62.66% 64.93% +2.26%
==========================================
Files 3 3
Lines 75 77 +2
==========================================
+ Hits 47 50 +3
+ Misses 28 27 -1
Continue to review full report at Codecov.
|
|
Nice, looks like a good idea to me at least. |
|
Yeah I don't know how to understand this. When I run it, I get: using Profile
ENV["JULIA_DEBUG"]="Requires"
@time @profile using DifferentialEquations
┌ Debug: Requires conditionally ran code in 0.0024978 seconds: `ArrayInterface` detected `SuiteSparse`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:677
┌ Debug: Requires conditionally ran code in 0.0158724 seconds: `ArrayInterface` detected `StaticArrays`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:692
┌ Debug: Requires conditionally ran code in 0.0029026 seconds: `ArrayInterface` detected `LabelledArrays`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:772
┌ Debug: Requires conditionally ran code in 0.0025199 seconds: `ArrayInterface` detected `Adapt`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:762
┌ Debug: Requires conditionally ran code in 0.0168244 seconds: `Polyester` detected `ForwardDiff`
└ @ Requires C:\Users\accou\.julia\packages\Polyester\hFLHn\src\Polyester.jl:19
┌ Debug: Requires conditionally ran code in 0.0026288 seconds: `Setfield` detected `StaticArrays`
└ @ Requires C:\Users\accou\.julia\packages\Setfield\9IaGB\src\Setfield.jl:31
┌ Debug: Requires conditionally ran code in 0.0060201 seconds: `ArrayInterface` detected `OffsetArrays`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:914
┌ Debug: Requires conditionally ran code in 0.0020892 seconds: `RandomNumbers` detected `Random123`
└ @ Requires C:\Users\accou\.julia\packages\RandomNumbers\3pD1N\src\RandomNumbers.jl:38
┌ Debug: Requires conditionally ran code in 0.0042834 seconds: `ArrayInterface` detected `BandedMatrices`
└ @ Requires C:\Users\accou\.julia\packages\ArrayInterface\TCj9U\src\ArrayInterface.jl:809
6.158199 seconds (19.59 M allocations: 1.412 GiB, 4.35% gc time, 14.08% compilation time)
using ProfileView
ProfileView.view()And this has puzzled me for weeks. I think the debug timings are correct because I mentioned to @KristofferC a few weeks ago that I went through DiffEq's stack and just removed all of the Requires usage from almost all downstream packages and saw almost no compile-time reduction, and those timings of about a 0.02 change match what I saw. So then it really confuses me that it takes 6 seconds and the profile says almost all of those 6 seconds are in Requires.jl. Either the profile is wrong or Requires.jl is doing something really horrifying even when it's not used to init. |
|
What is |
|
A nice cityscape when viewed from a distance. Including the profile: diffeq_requires_profile_with_C.zip though it's really easy to recreate it if you need it locally. |
|
I just ran this myself. The orange bars are |
|
OOOOOOOOOOOOOOOOOOOOOOOOOOOOH, loading.jl require, not Requires 😅 . Carry on. This debug information looks to match the profile then where I see little ArrayInterface.jl mountains which are ultimately insignificant. Awesome! |
|
Tim's handled the last few merges and releases here, but seems pretty busy. Does anyone else have merge & release rights? |
| precompile(withpath, (Any, String)) || @warn "Requires failed to precompile `withpath`" | ||
| precompile(err, (Any, Module, String)) || @warn "Requires failed to precompile `err`" | ||
| precompile(err, (Any, Module, String, String, Int)) || @warn "Requires failed to precompile `err`" | ||
| precompile(err, (Any, Module, String, String, Nothing)) || @warn "Requires failed to precompile `err`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could clear out all the warnings (now that Julia 1.7 does this automatically), but that could be a separate PR.
|
Thanks! JuliaRegistries/General#52183
Yup. Race against time to make progress on latency before the semester starts in earnest... |



Adds a debug log so you can monitor
@requires that get triggered and the time spent running codecc. @ChrisRackauckas I think you were also after something like this