Skip to content

Conversation

@AlexandreCarlton
Copy link
Contributor

In our new PerLevelDataLoaderDispatchStrategy, we incorporate the level of the current field (through the ResultPath) to detemrine when we should dispatch DataLoaders. For:

  • a deep enough level
  • a large number of fields

this can become quite taxing.

To optimise this, we memoize the level by calculating it in the constructor, which should have a negligible cost.

In our new `PerLevelDataLoaderDispatchStrategy`, we incorporate the
level of the current field (through the `ResultPath`) to detemrine when
we should dispatch `DataLoader`s. For:

 - a deep enough level
 - a large number of fields

this can become quite taxing.

To optimise this, we memoize the level by calculating it in the constructor,
which should have a negligible cost.
@andimarek
Copy link
Member

I have the same change on another branch 👍😃

@andimarek andimarek merged commit 7f39f56 into graphql-java:master Oct 11, 2025
1 check passed
@andimarek andimarek added this to the 25.x breaking changes milestone Oct 12, 2025
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