Skip to content

Excise JuliaHighighting, StyledStrings from stdlib and AnnotatedX from Base #58001

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Apr 3, 2025

This is a test branch for me to be able to easier see the effects StyledStrings has on e.g. latency and to provide a reference for #57998

As an example, running

begin
    using Pkg
    ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
    Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
    @time @eval Pkg.add("Example")
 end

on this branch

is

0.538453 seconds (2.96 M allocations: 177.956 MiB, 6.23% gc time, 87.22% compilation time: 45% of which was recompilation)

while on master it is

1.337046 seconds (6.75 M allocations: 371.075 MiB, 8.00% gc time, 91.44% compilation time: 71% of which was recompilation)

Also, even on this branch, loading REPL causes extra latency:

./julia -e '
begin
using Pkg
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
@time @eval Pkg.add("Example")
end
'
   Resolving package versions...
No packages added to or removed from `~/.julia/environments/v1.13/Project.toml`
No packages added to or removed from `~/.julia/environments/v1.13/Manifest.toml`
  0.249249 seconds (1.07 M allocations: 77.725 MiB, 9.64% gc time, 73.53% compilation time: <1% of which was recompilation)

which I think is due to #58000.


What is lost on this branch is:

  • Markdown julia code + REPL Expr highlighting
  • Clickable paths in Profile

It should be fairly easy to add those back with a tweak to printstyled for the link and some regex stuff for the highlighting.

I think the Profile tests will fail here because the PR that added StyledStrings dependency also did some other stuff and I don't think I detangled it correctly.

@KristofferC KristofferC added excision Removal of code from Base or the repository latency Latency labels Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excision Removal of code from Base or the repository latency Latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant