# Package load time regressions in v1.8-beta3

**URL:** <https://discourse.julialang.org/t/package-load-time-regressions-in-v1-8-beta3/78875>\
**Category:** Internals & Design\
**Created:** [March 31, 2022, 5:02pm UTC](https://discourse.julialang.org/t/package-load-time-regressions-in-v1-8-beta3/78875 "2022-03-31T17:02:46Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [May 12, 2022, 3:08pm UTC](https://discourse.julialang.org/t/package-load-time-regressions-in-v1-8-beta3/78875/21 "2022-05-12T15:08:27Z")

</div>

Sorry to get back to this but I saw a recent reference that a 1.8RC was on the works but [this PR](https://github.com/JuliaLang/julia/pull/45001) is not merged yet.  
Tried with 1.8DEV but the situation is the same (a substantial time regression).

With 1.7 I get

```julia
trees = invalidation_trees(invalidations)
insert_backedges for MethodInstance for GMT.read_data(::Dict{Symbol, Any}, ::String, ::String, ::GMTdataset{Float64, 2}, ::String, ::Bool, ::Bool)
insert_backedges for MethodInstance for GMT.get_GMTver()
SnoopCompile.MethodInvalidations[]

```

and with 1.9dev

```julia
trees = invalidation_trees(invalidations)
┌ Warning: Could not attribute the following delayed invalidations:
└ @ SnoopCompile C:\Users\joaqu\.julia\packages\SnoopCompile\KH4S4\src\invalidations.jl:450
Any[Tuple{Union{typeof(GMT.add_opt_pen), Char}, Dict{Symbol, Any}, Vector{Symbol}}, Tuple{Union{typeof(GMT.font), Char}, Dict{Symbol, Any}, Vector{Symbol}}, MethodInstance for show(::IOBuffer, ::UInt32), MethodInstance for show(::IOContext{IOBuffer}, ::UInt16)] invalidated Core.MethodInstance[MethodInstance for GMT.add_opt(::Dict{Symbol, Any}, ::String, ::String, ::Vector{Symbol}, ::NamedTuple{(:x, :y, :xy, :X, :Y, :asym, :colored, :cline, :csymbol, :wiskers, :cap, :pen), Tuple{String, String, String, String, String, String, String, String, String, String, String, Tuple{String, typeof(GMT.add_opt_pen)}}}, ::Bool, ::Any), MethodInstance for GMT.add_opt(::Dict{Symbol, Any}, ::String, ::String, ::Matrix{Symbol}, ::NamedTuple{(:angle, :Angle, :font, :justify, :region_justify, :header, :label, :rec_number, :text, :zvalues), Tuple{String, String, Tuple{String, typeof(GMT.font)}, Vararg{String, 7}}}, ::Bool, ::Bool), MethodInstance for Base._replace(::IOBuffer, ::Regex, ::String, ::UnitRange{Int64}, ::String), MethodInstance for Pkg.API.build(::Vector{Pkg.Types.PackageSpec})]
3-element Vector{SnoopCompile.MethodInvalidations}:
 inserting copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 invalidated:
   mt_backedges: 1: signature copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 (formerly copyto!(dest::AbstractArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:948) triggered MethodInstance for copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(==), Tuple{Vector{Float64}, Int64}}) (28 children)

 inserting copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 invalidated:
   mt_backedges: 1: signature copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 (formerly copyto!(dest::AbstractArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:948) triggered MethodInstance for copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(startswith), Tuple{Vector{String}, Base.RefValue{String}}}) (50 children)

 inserting copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 invalidated:
   mt_backedges: 1: signature copyto!(dest::BitArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:968 (formerly copyto!(dest::AbstractArray, bc::Base.Broadcast.Broadcasted{Nothing}) in Base.Broadcast at broadcast.jl:948) triggered MethodInstance for copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(!), Tuple{Vector{Bool}}}) (275 children)

```

The GMT specific invalidations are mysterious to me. I traced them to the use of certain members of a NamedTuple that will invoke a function call but they are used in many occasions but only _accused_ in two situations. But, even more, why are those invalidations only present in Julia \>= 1.8?

I don’t see what I can do for remedy this.

---

_[View the full topic](https://discourse.julialang.org/t/package-load-time-regressions-in-v1-8-beta3/78875)._
