-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
FileIO is a heavy dependency. #1379
Comments
That is quite interesting. Do you think this is FileIO's effect in general or just the way it is used here? In all the packages I work with that use FileIO I have not seen any similar effect, but then again I may just not have paid enough attention if the |
Hmm, I had FileIO take 36 seconds to load(!). But then I deleted the precompilation file and now it "only" takes 7 seconds. Doing the experiment above again I get (24s, 9s) without commenting, and (15s, 4s) with commenting. So better, but not as dramatic as before. |
It would be interesting with more data from others doing the same. |
I'd back taking on the dep if the different could be that great. Will try it out today |
I'm not sure if it is the |
It does seem FileIO is a bit slow I get this after precompilation
I did notice
I wonder if all this time is dominated by just this single dependency EDIT: maybe not
|
I have quite a lot more allocations in my
Perhaps it depends what other packages you have installed since FileIO perhaps conditionally do stuff depending on that? |
maybe. the above was my linux machine (where i typically work on; i.e. many packages installed). the following is my rather weak macbook (less packages installed)
|
Performance in loading is unfortunately strongly dependent on whether you're using any Consequently, for anyone tracking this down, if you've customized your julia> @time using FileIO
1.904531 seconds (1.40 M allocations: 78.818 MiB, 1.49% gc time) Then did it again and got back up to ~4s: julia> @time using FileIO
3.871966 seconds (3.07 M allocations: 179.900 MiB, 1.07% gc time) I think I had tried each enough times that OS cache shouldn't be a big factor. And in all cases I first did One thing worth noting are some of the memory ratios reported here:
Also check this out: after a build in which $ ls -l ~/.julia/lib/v0.6/FileIO.ji
-rw------- 1 tim holy 1287382 Feb 5 05:29 /home/tim/.julia/lib/v0.6/FileIO.ji After a build in which $ ls -l ~/.julia/lib/v0.6/FileIO.ji
-rw------- 1 tim holy 852048 Feb 5 05:44 /home/tim/.julia/lib/v0.6/FileIO.ji That's weird enough that I'm calling in @vtjnash here. |
The ratio thing may be a red herring; I just got a build of FileIO (with full registry) for which I get: julia> @time using FileIO
1.598653 seconds (1.01 M allocations: 56.735 MiB, 1.60% gc time) |
Does this behaviour also occur in 0.7? |
I had to add tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no
julia> using Example
julia> @time using FileIO
3.600703 seconds (3.65 M allocations: 191.672 MiB, 2.07% gc time)
julia>
tim@diva:~/.julia/v0.7/FileIO/src$ ls -l ~/.julia/lib/v0.7/FileIO.ji
-rw------- 1 tim holy 1897922 Feb 5 14:19 /home/tim/.julia/lib/v0.7/FileIO.ji
tim@diva:~/.julia/v0.7/FileIO/src$ touch FileIO.jl
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no -e 'using FileIO'
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no
julia> using Example
julia> @time using FileIO
2.297120 seconds (2.70 M allocations: 142.614 MiB, 2.93% gc time)
julia>
tim@diva:~/.julia/v0.7/FileIO/src$ ls -l ~/.julia/lib/v0.7/FileIO.ji
-rw------- 1 tim holy 1401622 Feb 5 14:21 /home/tim/.julia/lib/v0.7/FileIO.ji
tim@diva:~/.julia/v0.7/FileIO/src$ touch FileIO.jl
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no -e 'using FileIO'
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no
julia> using Example
julia> @time using FileIO
2.950153 seconds (2.53 M allocations: 136.272 MiB, 2.21% gc time)
julia>
tim@diva:~/.julia/v0.7/FileIO/src$ ls -l ~/.julia/lib/v0.7/FileIO.ji
-rw------- 1 tim holy 1904934 Feb 5 14:21 /home/tim/.julia/lib/v0.7/FileIO.ji
tim@diva:~/.julia/v0.7/FileIO/src$ touch FileIO.jl
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no -e 'using FileIO'
tim@diva:~/.julia/v0.7/FileIO/src$ julia-0.7 --startup-file=no -q --depwarn=no
julia> using Example
julia> @time using FileIO
8.187372 seconds (7.58 M allocations: 401.505 MiB, 1.21% gc time)
julia>
tim@diva:~/.julia/v0.7/FileIO/src$ ls -l ~/.julia/lib/v0.7/FileIO.ji
-rw------- 1 tim holy 3261892 Feb 5 14:22 /home/tim/.julia/lib/v0.7/FileIO.ji |
Filed a Julia issue: JuliaLang/julia#25900 |
Not sure it is worth keeping this open |
By default, Plots.jl takes about 40 seconds to compile, 18 seconds to start when already precompiled.
Commenting out
Plots.jl/src/output.jl
Lines 219 to 237 in 1ed7899
it instead takes 14 seconds to precompile and 4 seconds to start when precompiled.
Just thought the numbers were interesting, that a quite small code part (which only seems to provide png output by passing through a pdf) has such a significant impact on startup time.
The text was updated successfully, but these errors were encountered: