WhereTraits.jl icon indicating copy to clipboard operation
WhereTraits.jl copied to clipboard

Where does the compilation time come from?

Open ParadaCarleton opened this issue 4 years ago • 3 comments

What the title says, mostly; I was interested in using this while writing a package of mine, but the compilation time was just a touch over what I'd be willing to add to a package. A useful tool here.

ParadaCarleton avatar Oct 23 '21 17:10 ParadaCarleton

(I'm unable to figure out where "DataTypesBasic" is actually being used; if it's not being used, it can be dropped to reduce compilation time.)

ParadaCarleton avatar Oct 23 '21 17:10 ParadaCarleton

Hello @ParadaCarleton. Thank you very much for your remark. I will take a look into it and report back.

DataTypesBasic is also very small, so there really should not be much to compile in principle. Thank you also for the link to tools for compilation time imprvoement

schlichtanders avatar Oct 25 '21 08:10 schlichtanders

The compile time issue seems to have gotten significantly worse, as it now takes about a second to load:

julia> @time using WhereTraits
  0.948938 seconds (3.40 M allocations: 239.641 MiB, 2.33% gc time, 6.81% compilation time)

SimpleTraits.jl takes just 1% as much time, for comparison:

julia> @time using SimpleTraits
0.015284 seconds (40.05 k allocations: 3.885 MiB, 26.49% compilation time)

ParadaCarleton avatar Apr 09 '22 16:04 ParadaCarleton