You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some non-inferrable code in CSV gets invalidated when you load DataFrames. This is a sister issue to JuliaData/DataFrames.jl#3248, and you can read that issue for a more complete discussion of potential ways to address the issue. In CSV's case, the only invalidations you need to care about come from DataStructures; similar to the suggestion in JuliaData/DataFrames.jl#3248, the simplest approach might be to make DataStructures an obligate part of your package. But fixing the inference failure(s) (I haven't tried) would avoid the invalidation without taking on DataStructures as a dependency.
julia>using SnoopCompileCore
julia> invs =@snooprbeginusing DataFrames
using CSV
end;
julia> tinf =@snoopi_deep CSV.File(joinpath(pkgdir(CSV), "test", "testfiles", "precompile.csv"));
julia>using SnoopCompile
julia> tinf
InferenceTimingNode:7.241082/7.613602 on Core.Compiler.Timings.ROOT() with 15 direct children
julia> trees =invalidation_trees(invs);
julia> staletrees =precompile_blockers(trees, tinf)
1-element Vector{SnoopCompile.StaleTree}:
inserting iterate(v::Union{Base.KeySet{<:Any, <:DataStructures.SwissDict}, Base.ValueIterator{<:DataStructures.SwissDict}}, state) @ DataStructures ~/.julia/packages/DataStructures/59MD0/src/swiss_dict.jl:646 invalidated:
mt_backedges:1: MethodInstance for CSV.Context(::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg, ::CSV.Arg) at depth 1 with 2 children blocked InferenceTimingNode:0.000292/0.246068 on CSV.File(::String) with 2 direct children
The text was updated successfully, but these errors were encountered:
Some non-inferrable code in CSV gets invalidated when you load DataFrames. This is a sister issue to JuliaData/DataFrames.jl#3248, and you can read that issue for a more complete discussion of potential ways to address the issue. In CSV's case, the only invalidations you need to care about come from DataStructures; similar to the suggestion in JuliaData/DataFrames.jl#3248, the simplest approach might be to make DataStructures an obligate part of your package. But fixing the inference failure(s) (I haven't tried) would avoid the invalidation without taking on DataStructures as a dependency.
The text was updated successfully, but these errors were encountered: