JuliaLang / Downloads.jl

MIT License
89 stars 34 forks source link

add a small precompile workload #226

Closed KristofferC closed 1 year ago

KristofferC commented 1 year ago

Using

@time @eval Downloads.download("https://pkg.julialang.org/registries", tempname())

as a test (because that is the end function I am interested in) we get on master:

0.838721 seconds (489.98 k allocations: 34.457 MiB, 41.40% compilation time)

and with this PR:

0.484503 seconds (31.97 k allocations: 2.184 MiB, 4.42% compilation time)
codecov[bot] commented 1 year ago

Codecov Report

Merging #226 (a840de1) into master (3ed0f08) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #226   +/-   ##
=======================================
  Coverage   90.26%   90.26%           
=======================================
  Files           5        5           
  Lines         575      575           
=======================================
  Hits          519      519           
  Misses         56       56           
Impacted Files Coverage Δ
src/Downloads.jl 85.58% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

StefanKarpinski commented 1 year ago

Does an extra half a second on the first download really matter?

KristofferC commented 1 year ago

Yes. 0.5s * many things becomes many seconds. This is one small piece of a larger puzzle.