-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve loadtime by removing LazyArray (and be ready for julia 1.9) #189
Conversation
Moelf
commented
Oct 20, 2022
•
edited
Loading
edited
- Implement support for object caching through pkgimages JuliaLang/julia#47184
Codecov ReportBase: 90.27% // Head: 90.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #189 +/- ##
==========================================
+ Coverage 90.27% 90.38% +0.11%
==========================================
Files 11 11
Lines 1625 1623 -2
==========================================
Hits 1467 1467
+ Misses 158 156 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
What is the timing split between |
yeah @vchuravy got it, the problem is LazyArray ('s dependency) julia> @time_imports using UnROOT
0.9 ms Statistics
156.3 ms FillArrays
2.2 ms StaticArraysCore
571.9 ms StaticArrays
1171.1 ms ArrayLayouts and adding usage of |
Yeah we are not expecting using time to be drastically faster. |
after yeeting the LazyArray: #1.8.2
⋮ │ ⋮
69 rows omitted
________________________________________________________
Executed in 7.19 secs fish external
usr time 7.32 secs 0.00 micros 7.32 secs
sys time 1.46 secs 515.00 micros 1.46 secs
#1.9 wit the said PR
julia> @time_imports using UnROOT
543.1 ms StaticArrays
29 │ [20, 21, 22, 23, 24, 25, 26, 27]
30 │ [20, 21, 22, 23, 24, 25, 26, 27, 28]
31 │ []
⋮ │ ⋮
69 rows omitted
________________________________________________________
Executed in 4.05 secs fish external
usr time 4.26 secs 11.66 millis 4.25 secs
sys time 1.43 secs 3.16 millis 1.42 secs |
@@ -44,4 +44,12 @@ include("iteration.jl") | |||
include("custom.jl") | |||
include("displays.jl") | |||
|
|||
@static if VERSION >= v"1.9" |
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.
This should help for any version of julia, no? Also, top-level @static
does nothing: top-level expressions in a package are evaluated at compile-time anyway.
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.
this doesn't help for <1.9
got even faster after JuliaLang/julia#47184 > time ~/Documents/github/julia/julia --startup-file=no --project=. -e 'using UnROOT; t = LazyTree(UnROOT.samplefile("tree_with_jagged_array.root"), "t1") |> show'
Row │ int32_array
│ SubArray{Int32,
─────┼──────────────────────────────────────
1 │ []
2 │ [0]
69 rows omitted
________________________________________________________
Executed in 2.61 secs fish external
usr time 2.52 secs 638.00 micros 2.52 secs
sys time 0.09 secs 0.00 micros 0.09 secs |