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

Faster startup #1

Closed

Conversation

PallHaraldsson
Copy link

No description provided.

@giordano
Copy link

giordano commented Jun 5, 2020

It's totally useless to open a PR here as these packages are automatically generated, so I'm going to close it.

Also, did you actually see a performance improvement? Some time ago I tried this exact change and couldn't see any meaningful speedup.

@giordano giordano closed this Jun 5, 2020
@PallHaraldsson
Copy link
Author

PallHaraldsson commented Jun 5, 2020

Some time ago I tried

Only speedup on Julia 1.5+.

[You closed when I was typing, but I confirmed it can be faster, yes, by doing a bit differently, and I was actually thinking of adding to the script that generates after confirming works for this one.]

FFMPEG_jll is slowing down startup of Plots, by:

julia> @time using FFMPEG
  1.737923 seconds (1.45 M allocations: 85.451 MiB, 0.46% gc time)

Actually using FFMPEG_jll took a bit more time (I guess random variation, as that part should be less), so I start with adding the optimization here (do both?).

I take about half a sec off with only -O1, but the opt I would really want, that's currently only possible this way:

$ ~/julia-1.6-DEV-latest-7c980c6af5/bin/julia -O1 --compile=min --startup-file=no
julia> @time using FFMPEG_jll
  1.021192 seconds (1.18 M allocations: 71.671 MiB, 0.73% gc time)

JuliaPlots/PlotDocs.jl#200 (comment)

JuliaPlots/Plots.jl@6807f53

@giordano
Copy link

giordano commented Jun 5, 2020

Did you actually try your patch? I'm not sure you did.

Current FFMPEG_jll:

% julia-15 --startup-file=no -q
julia> @time using FFMPEG_jll
  1.127921 seconds (1.16 M allocations: 70.307 MiB, 1.70% gc time)

With your patch:

% julia-15 --startup-file=no -q
julia> @time using FFMPEG_jll
  1.188155 seconds (1.15 M allocations: 70.166 MiB, 1.66% gc time)

@giordano
Copy link

giordano commented Jun 5, 2020

I always only tried applying the change on a single package, and the difference is really meaningless. I don't consider it a regression, the change is very small.

Applying the change on all dependencies to see whether there is a cumulative effect is a task that has been on my backlog for some time. If it is proved that this provides a real speedup this change should be applied in BB, not here anyway

@PallHaraldsson
Copy link
Author

PallHaraldsson commented Jun 5, 2020

I've confirmed your non-change in speed by using my change as is (but see below about seemingly otherwise, or why):

(@v1.5) pkg> add FFMPEG_jll#579e909

but then I get speedup with it if I do:

$ ~/julia-1.5.0-beta1/bin/julia --startup-file=no -O1

and try again, so it seems the change isn't actually enforcing -O1, as it should.

With the same startup setting I DO get a speedup if I do:

(@v1.6) pkg> dev FFMPEG_jll

julia> @time using FFMPEG_jll
  1.569484 seconds (1.24 M allocations: 73.888 MiB, 1.97% gc time)

vs. before:
julia> @time using FFMPEG_jll
  1.647870 seconds (1.44 M allocations: 84.730 MiB, 0.46% gc time)

This is not the full speedup I wanted, but something, and note something is happening as it lowers allocations.

[In your case you did get 1.15 M vs 1.16 M allocations before, so something happened.]

@PallHaraldsson PallHaraldsson deleted the patch-1 branch June 8, 2020 16:56
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