-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Make REPL not slow-down if we load a valid cachefile #51565
Conversation
a8b2bce
to
c8d03ca
Compare
c8d03ca
to
4406234
Compare
I don't know what it is doing currently, but the cache files should not be left to the whims of
If as subprocess it required. With the |
The code is taken pretty verbatim form `generate_precompile.jl` and is in
https://github.com/JuliaLang/julia/blob/master/stdlib/REPL/src/precompile.jl
The issue is that during the execution of subordinate process no valid
cachefile exists?
…On Thu, Oct 5, 2023, 13:29 Jameson Nash ***@***.***> wrote:
I don't know what it is doing currently, but the cache files should not be
left to the whims of using REPL, but be getting loaded by exactly:
Base._tryrequire_from_serialized(pkg::PkgId, path::String, ocachepath::Union{Nothing, String})
If as subprocess it required. With the path and ocachepath values from
Base.pkgorigins[pkg]
—
Reply to this email directly, view it on GitHub
<#51565 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDO2QGIC5LRWZG2NHZ7JLX53U7JAVCNFSM6AAAAAA5RDAHNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBZGM2TKNZRGI>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
@vtjnash I've been trying to implement your suggestion but, to reiterate @vchuravy the issue is that this Update: Found another way around it: #52783 (comment) |
Fixes #51532.
We have funny series of interactions. With the REPL and its dependencies being removed from the system image,
we observed latency regressions when users create their own precompilation cache of REPL.
During the precompilation of REPL we launch a subordinate process that we send statements too.
Now we do want that process to use the existing cache of the REPL dependencies so we launch it with
--compiled-modules=existing
. Otherwise precompilation of REPL is even slower than it is now.When the user triggers recompilation of REPL due to the use of
-O3
the subordinate process seesa valid cache file for REPL itself. Thus no (or very few) precompilation statements are being
generated. Leading to the cache file compiled with
-O3
to have a significant latency regression.In this PR I work around this by replaying the precompilation statements of REPL from the subordinate
process. A bit hacky, but should be more reliable than trying to set up a "just right" depot,
or filtering the REPL cache-file out.