-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add minor precompile workload #750
Conversation
I don't know why the tests fail. The tests pass locally on Julia 1.6.1 and Julia 1.7-beta3.0. |
Updated demoWith Julia 1.6.2:
So, this gives the following means and means differences over two runs:
EDIT: I leave it up to you to decide whether this tradeoff is worth it. I think that saving about 0.5 seconds per use is worth it, but I might be biased. |
Is it possible that the tests fail due to a missing API key? In one of the test failures, I see |
Yes, it's a current known issue for PRs coming from forks. |
Personally I think it is a bit strange that HTTP.jl would do a HTTP request during precompilation. What if there is a server listening on this port? Isn't this simple enough to handle via PackageCompiler? |
PackageCompiler should be our past, not our future 😄. The future should be nice compiled code cached with each package, each upgradable independently. |
Yes, I'm aware that the implementation isn't perfect yet and am definitely open to better ideas |
Just like my attempt in #738, I'm on a mission to reduce the time to first
HTTP.get
. Precompile a bigger part of the workload seems like low hanging fruit compared to the rewrite in that PR.As a proof-of-concept, I've only added
HTTP.get
for now.Demo
I've run
@time using HTTP; @time HTTP.get("http://example.com")
twice onmaster
andprecompile
with Julia 1.7-beta3.0:As you can see, precompilation takes 2 seconds longer on
precompile
. However, the firstHTTP.get
is sped up by 0.3-0.7 seconds (allocations are reduced by 180 MiB).@timholy, could you take a quick look to see whether I've implemented it correctly?