-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reduce TTFX with PrecompileTools.jl #5
Conversation
6593489
to
43c74a7
Compare
Looks great! No changes needed except to ask if you need to close the plot at the end of the workload; you could test with 1.10beta, which will keep precompilation "open" until all tasks finish. Closing the plot is often all that's needed. |
Sorry, I didn't fully get that, @timholy. Is it that, since we are plotting within the |
One more question: in the before-and-after comparison on my original post above, the TTFX of the methods is way faster, as they have been "exercised" during pre-compilation. However, the actual loading of the package, i.e., This slide from the talk is what is throwing me off, because it seems that the TTL is decreasing with newer Julia versions. But maybe that is because of improvements to the core, and not related at all to PrecompileTools.jl? EDIT Okay, my bad for not taking the time to properly read PrecompileTools and PackageCompiler.
The short answer seems to be no. |
That's what I am concerned about (you could test with 1.10beta and see if it's actually an issue).
Hope for further Julia improvements? I do think there's more we can do to speed loading, although it's a bit complicated. What happened in 1.10 (thanks to others, I've played no real role in TTL) is basically doing a lot of profiling and discovering opportunities for improvement. If you really want to dive into that (warning: there be dragons), read https://docs.julialang.org/en/v1.11-dev/devdocs/external_profilers/#Tracy-Profiler first. That just might discover individual items that are increasing load time. But the alternative is to just wait and see if Julia speeds up loading; it seems like that at least another 2x or more could be attained by some (fairly complicated) architecture changes. Fundamentally you're loading more code than you were before. Julia 1.9 and 1.10 are faster than their predecessors on the same package implementation, but when you add more code to load then a slowdown is expected. This is a little worse than I would like it to be but it's in the range of what I've seen. You may have to decide between different competing priorities. |
Following the "State of Julia" talk at JuliaCon 2023, this PR is for adding PrecompileTools.jl as a dependency to TORA.jl and to "exercise" parts of the library during pre-compilation in order to significantly reduce the time to first execution (TTFX) during a regular Julia session. The trade-off for this change is an increased pre-compilation time.
Before
After