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

Add LightOperationExecutor support for parameterless operations #502

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shalearkane
Copy link

@shalearkane shalearkane commented Jun 21, 2024

LightOperationExecutor is a performance improvement over OperationExecutor for simple queries as it implements LightDataFetcher interface from GraphQL-Java #2953 and yields about 5% performance improvement in simple queries.

LightDataFetcher implementations do not require DataFetchingEnvironment for getting values and are considered cheaper to execute as DFE is not constructed for the query.

This also makes the DataFetchingEnvironment attribute of ResolutionEnvironment private and instead returns it via a getter since now it can either be a materialised object or wrapped in a Supplier. Also, I have removed some of the attributes of ResolutionEnvironment as it required DFE to be materialised.

soumik.dutta added 2 commits June 21, 2024 18:32
LightDataFetcher do not require materialised DataFetchingEnvironment to execute and are cheaper to run.
@shalearkane shalearkane marked this pull request as ready for review June 28, 2024 07:51
@kaqqao
Copy link
Member

kaqqao commented Jun 28, 2024

Hi! These are interesting PRs, thanks for this!
I'm currently traveling and don't have a computer with me, but I'll have a proper look when I'm back.

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