Description
openedon Jul 19, 2022
@IanButterworth this new @time
recompilation time tracking is super cool! :) 🎉
It seems like maybe there's a small bug here, where we aren't disabling is_recompile
when compiling the transitive dependency that actually caused the invalidation?
Notice how in this example, both of the last two compilations of foo()
are 100% of which was recompilation
, whereas in the last example, actually half of its time its compiling bar()
, which isn't technically recompilation, but rather regular compilation, right? At least, it's treated as regular compilation when just compiling @eval bar()
directly. So i think they should be consistent, and the last one should be something like 50% recompilation!
julia> foo() = bar()
foo (generic function with 1 method)
julia> bar() = 2
bar (generic function with 1 method)
julia> @time @eval foo()
0.000281 seconds (805 allocations: 52.906 KiB, 48.30% compilation time)
2
julia> bar() = 3
bar (generic function with 1 method)
julia> @time @eval bar()
0.000241 seconds (392 allocations: 26.141 KiB, 31.56% compilation time)
3
julia> @time @eval foo()
0.000379 seconds (454 allocations: 28.562 KiB, 50.04% compilation time: 100% of which was recompilation)
3
julia> bar() = 4
bar (generic function with 1 method)
julia> @time @eval foo()
0.000293 seconds (798 allocations: 52.406 KiB, 47.01% compilation time: 100% of which was recompilation)
4
What do you think? Does this seem like a bug to you as well?
Originally posted by @NHDaly in #45015 (comment)