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

Add precompilation #97

Open
tfiers opened this issue Jan 28, 2023 · 7 comments
Open

Add precompilation #97

tfiers opened this issue Jan 28, 2023 · 7 comments

Comments

@tfiers
Copy link
Owner

tfiers commented Jan 28, 2023

this deprecates (hopefully)

@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

Let's time.
Now (WSL2):

julia> @re
julia> using PkgGraph
julia> @time PkgGraph.depgraph_as_dotstr(:OrdinaryDiffEq);
  5.050874 seconds (18.93 M allocations: 1.692 GiB, 9.92% gc time, 16.54% compilation time)

@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

https://timholy.github.io/SnoopCompile.jl/stable/snoop_pc/

hah, so it wasn't a precomp issue:
image

@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

Ok but still useful. This is before any precomp:
image

and this is after adding

@precompile_all_calls begin
    depgraph_as_dotstr(:DefaultApplication)
end

image

(julia 1.9, so presumably w/ native code caching)

sure, ok.

@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

Kindof annoying though: re-precompilation time (i.e. every time I edit the src) is now 4.3 seconds longer (almost 2x as long)
whereas TTFX at 0.3 is very reasonable.
So I'mma disable it again.

  • Disable precompilation

tfiers added a commit that referenced this issue Jan 28, 2023
@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

Ok there is a decent first run delay: https://asciinema.org/a/555338

(asciinema rec, converted to svg with https://github.com/marionebl/svg-term-cli)
i.e. svg-term --cast=555338 --out blah.svg (then explorer.exe .))

blah

@tfiers tfiers reopened this Jan 28, 2023
@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

re

so precompile the ProgressMeter, and the initial @info of depgraph, yes please; but: I don't want to spew output during precompilation (and @precompile_all_calls does not suppress stdout by default)

@tfiers
Copy link
Owner Author

tfiers commented Jan 28, 2023

We can profile our compilation (and/or type inference) time:

(snoopi deep)

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

No branches or pull requests

1 participant