GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — avoid wrapping materialized fieldValueObject in a CompletableFuture by samuelAndalon · Pull Request #3943 · graphql-java/graphql-java Conversation
|
| CompletableFuture<Object> executionResultFuture = fieldValueInfo.getFieldValueFuture(); | ||
| ctxCompleteField.onDispatched(); | ||
| executionResultFuture.whenComplete(ctxCompleteField::onCompleted); | ||
| if (fieldValueInfo.isFutureValue()) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I could've done this as well but it has the unchecked cast already handled internally by FieldValueInfo
Object executionResult = fieldValueInfo.getFieldValueObject(); ctxCompleteField.onDispatched(); if (executionResult instanceof CompletableFuture) { @SuppressWarnings("unchecked") CompletableFuture<Object> executionResultFuture = (CompletableFuture<Object>) executionResult; executionResultFuture.whenComplete(ctxCompleteField::onCompleted); } else { ctxCompleteField.onCompleted(executionResult, null); }
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice catch - I am embarrassed I missed this in the great "materialised migration" effort
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
all good! thank you, now I am curious the memory and CPU improvement this change will bring |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bbakerman I wonder if this can be cherry picked to version 22.x ? I can prepare the PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.