Skip to content

Make ExecutionStepInfo values be lazy - #2749

Merged
andimarek merged 1 commit into
masterfrom
make_values_lazy_in_esi
Mar 1, 2022
Merged

andimarek merged 1 commit into
masterfrom
make_values_lazy_in_esi

Conversation

@bbakerman

Copy link
Copy Markdown
Member

This will improve memory usage if you don't use the ESI arguments, and it will reduce CPU usage somewhat in heavy systems by doing less work (albeit by a small amount)

If a DFE or other code does not ask for the arguments - then no value resolving will happen for them.

This will improve memory usage if you don't use the ESI arguments, and it will reduce CPU usage somewhat in heavy systems by doing less work (albeit it a small amount)
@bbakerman bbakerman added this to the 18.0 milestone Feb 28, 2022

private final Object object;
private final ImmutableMapWithNullValues<String, Object> arguments;
private final Supplier<ImmutableMapWithNullValues<String, Object>> arguments;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a viral change - type resolving wont materialise the ESI arguments unless it has to

this.parent = builder.parentInfo;
this.type = assertNotNull(builder.type, () -> "you must provide a graphql type");
this.arguments = builder.arguments;
this.fieldContainer = builder.fieldContainer;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to builder as arg - modernisation

@andimarek
andimarek merged commit e973c9a into master Mar 1, 2022
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