Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Invalidations.yml #59

Merged
merged 1 commit into from
Oct 2, 2022
Merged

Conversation

ranocha
Copy link
Contributor

@ranocha ranocha commented Sep 1, 2022

@LilithHafner LilithHafner merged commit a17c80c into JuliaCollections:master Oct 2, 2022
@LilithHafner
Copy link
Member

Invalidations on default branch: 515 (515 via deps)
This branch: 515 (515 via deps)

Does this mean that the method definitions in SortingAlgorithms.jl cause no invalidations while DataStructures.jl causes 512 invalidations?

@LilithHafner
Copy link
Member

Is it also possible to get a report of invalidations on the default branch after merging?

@LilithHafner
Copy link
Member

The check passes even when the number of invalidations increases. @ranocha, do you have any idea what is going in here?

@ranocha ranocha deleted the patch-1 branch October 2, 2022 08:42
@ranocha
Copy link
Contributor Author

ranocha commented Oct 2, 2022

The check passes even when the number of invalidations increases. @ranocha, do you have any idea what is going in here?

That's definitely weird - I tested it in a dummy repo before and it worked as expected, see https://github.com/ranocha/InvalidationsTest.jl/actions/runs/2971488885/jobs/4758759868#step:10:5

Is it also possible to get a report of invalidations on the default branch after merging?

Right now, this CI setup does not support that. It could certainly be modified, though. There is also some work going on to improve this kind of CI, see https://discourse.julialang.org/t/potential-performance-regressions-in-julia-1-8-for-special-un-precompiled-type-dispatches-and-how-to-fix-them/86359/22

@ranocha
Copy link
Contributor Author

ranocha commented Oct 2, 2022

Invalidations on default branch: 515 (515 via deps)
This branch: 515 (515 via deps)

Does this mean that the method definitions in SortingAlgorithms.jl cause no invalidations while DataStructures.jl causes 512 invalidations?

With Julia 1.8.2, I get

julia> import Pkg; Pkg.activate(temp=true); Pkg.add("SortingAlgorithms")

julia> using SnoopCompileCore; invalidations = @snoopr(using SortingAlgorithms); using SnoopCompile

julia> length(uinvalidated(invalidations))
500

julia> trees = invalidation_trees(invalidations)
8-element Vector{SnoopCompile.MethodInvalidations}:
 inserting insert!(m::DataStructures.SortedMultiDict{K, D, Ord}, k_, d_) where {K, D, Ord<:Base.Order.Ordering} in DataStructures at ~/.julia/packages/DataStructures/59MD0/src/sorted_multi_dict.jl:167 invalidated:
...

 inserting (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), d::OrderedCollections.OrderedDict) in OrderedCollections at ~/.julia/packages/OrderedCollections/PRayh/src/dict_sorting.jl:4 invalidated:
...

 inserting merge!(d::AbstractDict, other::DataStructures.PriorityQueue) in DataStructures at ~/.julia/packages/DataStructures/59MD0/src/priorityqueue.jl:360 invalidated:
...

 inserting iterate(v::Union{Base.KeySet{<:Any, <:DataStructures.SwissDict}, Base.ValueIterator{<:DataStructures.SwissDict}}) in DataStructures at ~/.julia/packages/DataStructures/59MD0/src/swiss_dict.jl:646 invalidated:
...

 inserting convert(::Type{Array}, cb::DataStructures.CircularBuffer{T}) where T in DataStructures at ~/.julia/packages/DataStructures/59MD0/src/circular_buffer.jl:166 invalidated:
...

 inserting fpsort!(v::AbstractVector, ::SortingAlgorithms.RadixSortAlg, o::Base.Order.Ordering) in SortingAlgorithms at ~/.julia/packages/SortingAlgorithms/PEcBU/src/SortingAlgorithms.jl:125 invalidated:
...

 inserting convert(::Type{OrderedCollections.OrderedDict{K, V}}, d::OrderedCollections.OrderedDict{K, V}) where {K, V} in OrderedCollections at ~/.julia/packages/OrderedCollections/PRayh/src/ordered_dict.jl:110 invalidated:
...

 inserting iterate(v::Union{Base.KeySet{<:Any, <:DataStructures.SwissDict}, Base.ValueIterator{<:DataStructures.SwissDict}}, state) in DataStructures at ~/.julia/packages/DataStructures/59MD0/src/swiss_dict.jl:646 invalidated:
...

Note the line inserting fpsort!(v::AbstractVector, ::SortingAlgorithms.RadixSortAlg, o::Base.Order.Ordering) in SortingAlgorithms at ~/.julia/packages/SortingAlgorithms/PEcBU/src/SortingAlgorithms.jl:125 invalidated, meaning that a method definition in this packages causes some invalidations (of code from Base, so in a dependency). Bute most invalidations are caused by methods defined in DataStructures.jl (and OrderedCollections.jl, included in DataStructures.jl).r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants