We currently have a very large file where this gem's cops stuck and never finish. The reasons are that lib/rubocop/graphql/sorbet.rb uses O(n^2) loop and lib/rubocop/cop/graphql/ordered_arguments.rb performs a costly traversing of the descendants tree twice, where only one would suffice.
After these changes, now rubocop finishes in 17 seconds for that file.
We currently have a very large file where this gem's cops stuck and never finish. The reasons are that
lib/rubocop/graphql/sorbet.rb
uses O(n^2) loop andlib/rubocop/cop/graphql/ordered_arguments.rb
performs a costly traversing of the descendants tree twice, where only one would suffice.After these changes, now rubocop finishes in 17 seconds for that file.