-
Notifications
You must be signed in to change notification settings - Fork 33
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 startup #109
Comments
FYI: Startup CAN be much faster, while this change not wanted I guess:
With only |
I would need much more detailed guidance (hand-holding, ride-sharing), being entirely unfamiliar with how to approach this efficiently and cleanly. |
It may not even be about your package [EDIT: seems to be], I just stopped looking there, as it was I thought a likely candidate (and even if, people may blame your). First see what the cause is and I checked some of your dependencies:
Even if your package is no to blame, or if, a JLL might be a good idea, I'm just completely new to that. And SnoopComplie.jl has instructions and I tried to read through, you may want to or first find the root cause. |
What you could do, as it's interesting, is see what's the lowest optimization you can get away with, start with Some more dependencies:
|
Actually looking at your dependencies (and of Quadmath's) it seems like this may be (mostly) because of your package, unless I missed some. |
You (or your users) can actually compile similar to here: https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/ But I thought JLLs might apply, but I'm not sure they do, unless you could make work with above: |
What are "invalidations" and how do I identify specific ones? |
This package is not a likely candidate for jll treatment. There is no underlying other library. To apply the module level optimization control would require divvying up the package into submodules and that design reworking is only worth considering if we could ascertain which files were gulping the compile time. Is that possible to determine easily? I am not surprised about the "invalidations"; the package design and development did not involve avoiding "invalidations". How is that done? |
https://timholy.github.io/SnoopCompile.jl/stable/#Who-should-use-this-package-1
We do have a profiler, but we would really need a profiler or a mode showing only the proportion of time of each dependency (not sure SnoopCompile does that), as hunting down worst dependency (recursively) is tedious. Otherwise these is an excellent tools:
|
It was easier than I thought:
I end up with lots of files such as, what you should add to the project:
The other (inference) option is cryptic for me, and for now I do not look into it, not sure I need to:
|
Unfortunately, |
I'm not so sure. Yes, it see only for binaries, and a system image is better and could greatly help: https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/ Despite the name, it's meant to compile Apps too (Viral suggested renaming the package, and issue was closed as that discussion had been had before). But it's also for Packages, as he name says, I just do not locate how to generate JLLs. Maybe it's coming later, or the package a useful intermediate step, and then use BinaryBuilder.jl or something. I don't have much experience with all this, only have compiled an App. For system image:
It seems the name should be PackageSCompiler.jl and you can only save all your packgeS, as there's only one sysem image you can load (at a time)? Since your package, and this double-double idea, is awesome, should it be integrated in Julia's Base? That would side-step the problem. If you're package is relatively stable now, it could be an option, and turn this package into a no-op (or for add-on future development). |
It is unlikely that this package would be integrated into Base because there is a good deal of other package's overhead involved, and, frankly, while quite stable, the code base is too massive for that. I am delighted to know that you find it to be so useful. In my spare time, I am considering reworking, simplifying and perhaps improving an implementation of Double64s -- it will be awhile :) |
I've been tracking down slow startup, and this package makes startup of many, including plotting ecosystem slow.
It has many invalidations, I infer from the second using, and SnoopCompile.jl I understand, is the solution and/or changing it to a JLL package.
This package is the main factor slowing down VegaDatasets.jl (I'm not sure it needs this one), though dependency TextParse.jl.
I originally was looking into why
using Queryverse
is slow, a meta-package that includes the above, and people claim plotting (first plot) is slow, based on this remotely related package... I however think it's really cool.The text was updated successfully, but these errors were encountered: