Skip to content
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

Update REPLMode.jl for faster startup #4015

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PallHaraldsson
Copy link

@PallHaraldsson PallHaraldsson commented Sep 4, 2024

Fixes 3x PythonCall startup regression because of: JuliaPy/CondaPkg.jl#145 (at least least if backported to 1.11).

$ julia +1.11 --compile=min

julia> @time Pkg.REPLMode.gen_help()
  0.180643 seconds (91.88 k allocations: 2.218 MiB, 17.97% compilation time)

vs.
julia> @time Pkg.REPLMode.gen_help()
  2.129547 seconds (871.64 k allocations: 44.875 MiB, 5.32% gc time, 99.94% compilation time)

That one function slows down CondaPkg, and therefore also PythoCall, by that amount on 1.11

@PallHaraldsson
Copy link
Author

I think I can only selectively change opt for a module, not one function. That's the one I care about, do you think any of the others are speed-critical?

@KristofferC
Copy link
Sponsor Member

KristofferC commented Sep 9, 2024

What version are you on? This is for me:

julia> VERSION
v"1.11.0-rc3"

julia> using Pkg

julia> @time Pkg.REPLMode.gen_help()
  0.000287 seconds (2.50 k allocations: 134.836 KiB)
  Welcome to the Pkg REPL-mode. To return to the julia>
...

@PallHaraldsson
Copy link
Author

I was working on 1.11.0-rc3. Make sure to test in the REPL without ever opening the Pkg mode (or not in the REPL).

However, I'll likely abandon this (draft) and try to get Pkg faster, rather avoid depending on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants