Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make REPL not slow-down if we load a valid cachefile (JuliaLang#51565)
Fixes JuliaLang#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 sees a 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.
- Loading branch information