Skip to content

Visibility: better duplicate name lookup#5325

Merged
rmosolgo merged 1 commit intomasterfrom
fix-vis-for-large-lists
Apr 9, 2025
Merged

Visibility: better duplicate name lookup#5325
rmosolgo merged 1 commit intomasterfrom
fix-vis-for-large-lists

Conversation

@rmosolgo
Copy link
Copy Markdown
Owner

@rmosolgo rmosolgo commented Apr 9, 2025

Fixes #5324

This code worked fine for small lists, where .find was trivial, but for large lists, it's better to use a Set (which uses a Hash under the hood). I think the memory overhead here won't be a problem since the cost here is basically one new Set per uniquely-named list in the current query (6 new objects in the example in #5324, 318 -> 324, but queries which use more distinct GraphQL types during execution will add more objects).

@rmosolgo rmosolgo added this to the 2.5.3 milestone Apr 9, 2025
@rmosolgo rmosolgo merged commit 5a7d96b into master Apr 9, 2025
15 checks passed
myronmarston added a commit to block/elasticgraph that referenced this pull request Apr 17, 2025
This reverts commit d83392c.

The performance issue that prompted that commit has been addresed in the
GraphQL gem (in rmosolgo/graphql-ruby#5325) and
released in 2.5.3, which we recently upgraded to. So there's no reason
to continue using the old `Warden` plugin.
myronmarston added a commit to block/elasticgraph that referenced this pull request Apr 17, 2025
This reverts commit d83392c.

The performance issue that prompted that commit has been addresed in the
GraphQL gem (in rmosolgo/graphql-ruby#5325) and
released in 2.5.3, which we recently upgraded to. So there's no reason
to continue using the old `Warden` plugin.
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.

Schema::Visibility is much slower than Schema::Warden

1 participant