-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Using Downloads.download
during precompilation of a package waits a long time for "IO to finish"
#223
Comments
SIGUSR1 doesn't reveal anything interesting:
static_show of the timer:
Unsurprisingly, this looks like a timer from Downloads.jl |
I think this is from #38. There is a timer that will reuse the download object if it is used within 30 seconds. Initial thought is that 30 seconds feels very long. Edit: Looks like I thought so 3 years ago as well: #38 (comment) :P I guess I can set a default downloader with a different grace period. |
Should we reduce the default grace period? That would be fine. |
I guess one question to ask is: how much do you approximately win (in time) by reusing an existing download object? The grace period should be somewhat similar to that number I think? |
Ah, yeah, that's a good point. I have no idea and I think it depends a lot on whether you are able to reuse pre-negotiated TLS connections and so on. |
There should be a call |
I had run into this issue when doing
|
Update: the expected way to deal with this now is currently to register an atexit hook that eagerly closes any outstanding downloads and stops the creation of any future background downloads (e.g. sets the timeout to zero). |
sounds good.
Is this guidance for the user or how to fix Downloads.jl itself? |
Downloads.jl should fix this (probably with an atexit hook to call closeall) |
The following MWE package takes around 30s when precompiling due to "waiting for IO to finish":
We can see the download call finish quickly but the precompilation of the package takes ~30 seconds.
There must be some timer hanging around for a long time that doesn't get stopped when the download finish?
The text was updated successfully, but these errors were encountered: