-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Regression in Pkg.add
latency vs one 1.12 nightly against the next
#57997
Comments
As far as I can see, bisected to 42e5e47. cc @jakobnissen If I avoid loading the REPL, the regression seems to go away:
|
It seems it is StyledStrings that causes a lot of this (as it always is). I made a branch so that StyledStrings is not loaded by default by the REPL (and deps) in https://github.com/JuliaLang/julia/tree/kc/no_styled. And we get: No StyledStrings: julia> using Pkg
julia> Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true;
julia> ENV["JULIA_AUTO_PRECOMPILE"] = 0;
julia> @time @eval Pkg.add("Example")
Resolving package versions...
No packages added to or removed from `~/.julia/environments/v1.12/Project.toml`
No packages added to or removed from `~/.julia/environments/v1.12/Manifest.toml`
0.443519 seconds (2.97 M allocations: 170.194 MiB, 6.73% gc time, 94.00% compilation time: 68% of which was recompilation) With StyledStrings julia> using StyledStrings
julia> using Pkg
julia> Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true;
julia> ENV["JULIA_AUTO_PRECOMPILE"] = 0;
julia> @time @eval Pkg.add("Example")
Resolving package versions...
No packages added to or removed from `~/.julia/environments/v1.12/Project.toml`
No packages added to or removed from `~/.julia/environments/v1.12/Manifest.toml`
1.769898 seconds (11.39 M allocations: 610.943 MiB, 7.10% gc time, 98.41% compilation time: 76% of which was recompilation) I'm guessing it is related to
which was brought up a year ago in JuliaLang/StyledStrings.jl#61. cc @tecosaur, @topolarity |
Thanks for digging into this. If I understand correctly, this is not due to inference problems in the iobuffer code (which I believe should all be well-inferred), but instead inference issues in StyledStrings, or in Base. |
I don't know yet why that specific commit caused the issue. But reverting that commit on my branch that doesn't load StyledStrings doesn't change any timings so it doesn't seem like there is anything bad with that code on its own. |
Wow, that's quite a large regression. Is there any way to better identify what is behind this change? I'm very sympathetic to the headaches with StyledStrings involved here, I just have a hard time identifying actionable changes to improve the situation. The only change involving StyledStrings / the annotated code that's occurred recently is #57912, but it's hard for me to see how that could be implicated here. The core issue seems to be the This leaves us with (1) abandoning the idea of a stdlib to manage rich content better across the stdlib, as per #57998 (2) adjusting the base/stdlib split (3) doing some slightly tricky work to make it work despite the split (which is what I've been speaking with Cody about, and what I sense you've run out of patience waiting for Kristoffer). |
The actionable change is to fix the StyledStrings type-piracy.
Yes, we'll need to fix these soon - it should have been done earlier in the 1.12 release cycle, but let's get it done now and relieve some pain for folks |
It's ok, #57998 is very actionable, and I can take that on. |
On e892948 (Version 1.12.0-DEV.2136 (2025-03-26))
On (c175ace)
1.12.0-beta1
The text was updated successfully, but these errors were encountered: