Slowdown _after_ package load

Most likely something in MyPkg is invalidating much of the code in Base. I’m guessing that you’re adding a method that applies very high in the hierarchy of some fundamental and widely used function. For example, if it redefines Base.getindex(a::Vector{T}, i::Int) where T, then every part of Julia that indexes a vector will have to be recompiled. convert methods might be another candidate.

You might be able to debug this with SnoopCompile’s @snoopi so you can see what inference is working on.

1 Like