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

Entering package mode on Windows in 1.11 for the first time takes too long #54366

Open
davidanthoff opened this issue May 5, 2024 · 6 comments
Labels
stdlib:REPL Julia's REPL (Read Eval Print Loop)

Comments

@davidanthoff
Copy link
Contributor

There is a delay of more than 14 seconds when I press ] to enter package mode on a new install. Here is a video that shows the timing: https://www.youtube.com/watch?v=a7PU7C1rMvw.

One strange thing is that on subsequent attempts (even after a boot of the computer) the delay is almost entirely gone. Not entirely straightforward on how to reproduce this, but uninstall 1.11 via juliaup rm 1.11 and then booting the computer mostly gets my system back into a state where the delay is present. The system where this is happening is a new desktop computer with essentially top specs for everything.
 
We (@KristofferC, @IanButterworth and I) on Slack where one hypothesis is that this is somehow related to Windows Defender scanning files on a first load, caching the results of that somehow... If that is true, maybe #54365 might help. While I'm not sure, Windows Defender might take less time to check files that have proper digital signatures on them.

@KristofferC
Copy link
Sponsor Member

Someone that can repro this could probably get it in a profiler and see if it is waiting on some syscall or something.

@IanButterworth IanButterworth added the stdlib:REPL Julia's REPL (Read Eval Print Loop) label May 6, 2024
@IanButterworth IanButterworth added this to the 1.11 milestone May 6, 2024
@KristofferC
Copy link
Sponsor Member

Also, is it really entering package mode that is slow or is it using Pkg?

@KristofferC
Copy link
Sponsor Member

KristofferC commented May 9, 2024

I think this is too vague to be on the milestone. Also, on the video it seem to take 25 seconds to even start julia so I would not say package mode is the problematic thing here.

@KristofferC KristofferC removed this from the 1.11 milestone May 9, 2024
@IanButterworth
Copy link
Sponsor Member

IanButterworth commented May 13, 2024

On MacOS I'm noticing a lot more delay in first Pkg switch and first completion hint in pkg on nightlies via juliaup vs. julia built locally.

First pkg switch was like 4s via juliaup, ~0.3s via local build
In a new session after that they're about the same at ~0.3s

So I guess MacOS also does some system check on dylibs on first execution too.

@davidanthoff I think it might make sense for juliaup to handle this kind of first execution system check. So launch julia and load all stdlibs after installation?


@KristofferC pointed to this which could be the MacOS issue https://news.ycombinator.com/item?id=23273247
Perhaps a solution would be what's discussed here? https://news.ycombinator.com/item?id=23273396

@davidanthoff
Copy link
Contributor Author

Are we stapling that notarization stuff to the files in the tarball that Juliaup is using for MacOS?

My gut sense right now is that we first should just make sure that the archives that Juliaup is using have all the code signing/notarization that can be done, then check whether we still have performance problems, and if so, we can still think about more stuff that Juliaup could do.

@IanButterworth
Copy link
Sponsor Member

Side note, I noticed that on MacOS if you have a slow but active internet connection then precompilation, including building stdlibs, is really slow because MacOS is trying and failing to do the stuff mentioned here https://news.ycombinator.com/item?id=23273247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

3 participants