GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fixes #1524 by wasche · Pull Request #1525 · graphql-java/graphql-java

Conversation

@wasche

@wasche wasche commented May 6, 2019

Copy link
Copy Markdown
Contributor

before:
AddError.benchMarkAddError ss 5 1.079 ± 0.064 s/op

after:
AddError.benchMarkAddError ss 5 0.131 ± 0.059 s/op

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
wasche added 2 commits May 6, 2019 14:46
@wasche
fixes #1524
d3e1df7
@wasche
fixes #1524
51f3665
@bbakerman

bbakerman commented May 7, 2019

Copy link
Copy Markdown
Member

Do you have a use case where you want to create 5000 errors and you have noticed an actual slow down because of the O(n) error lookup

These types of micro benchmarks have a history of not paying off in practice.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wasche

wasche commented May 7, 2019

Copy link
Copy Markdown
Contributor Author

The amount of throuput we do, we've run into this issue numerous times, and it effects us hitting our SLA. So yes, this has had a significant impact on performance. In an ideal world, there wouldn't be so many errors, but they are out of our control.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@samkline

samkline commented May 7, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Hi @bbakerman, thanks for looking at this. I was working with @wasche on this and at the time I had hooked up VisualVM to get some CPU profiles. The way I ran this test was to throw a bunch of queries at our GraphQL service. Each query fetched a few hundred items from one service, and then went to a few supplementary services to fill in the fields for those items. I took one of those supplementary services offline to see how the system responded. The issue we were seeing is that if one of those services went down, GraphQL's CPU usage would spike and the service would be severely degraded.

Sadly I don't have the full results anymore but I do have this screenshot (below) showing that within my test, of all the time used by ExecutionStrategy.completeField, 93% of it was spent in ExecutionContext.addError. I believe I ran the test for only a minute or two, so the 25 seconds in the screenshot represents a large amount of work.

I had added a workaround in our service when we were running 9.2, but now that we're upgrading to 12.0, our workaround no longer works (we were relying on the public constructor of ExecutionContext to subclass it and override the addError behavior).

Screen Shot 2018-12-05 at 7 22 36 AM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bbakerman

bbakerman commented May 9, 2019 via email

Copy link
Copy Markdown
Member
Ok thanks for the evidence... We will merge
…
On Wed, May 8, 2019, 12:26 AM Sam Kline ***@***.***> wrote: Hi @bbakerman <https://github.com/bbakerman>, thanks for looking at this. I was working with @wasche <https://github.com/wasche> on this and at the time I had hooked up VisualVM to get some CPU profiles. The way I ran this test was to throw a bunch of queries at our GraphQL service. Each query fetched a few hundred items from one service, and then went to a few supplementary services to fill in the fields for those items. I took one of those supplementary services offline to see how the system responded. Sadly I don't have the full results anymore but I do have this screenshot (below) showing that within my test, of all the time used by ExecutionStrategy.completeField, 93% of it was spent in ExecutionContext.addError. I had added a workaround in our service when we were running 9.2, but now that we're upgrading to 12.0, our workaround no longer works (we were relying on the public constructor of ExecutionContext to subclass it and override the addError behavior). [image: Screen Shot 2018-12-05 at 7 22 36 AM] <https://user-images.githubusercontent.com/1139644/57307377-71f6cc80-70b2-11e9-9480-db0498f8581d.png> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1525 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAMVWSMH4KQ5GI4NRF2ZAE3PUGGSHANCNFSM4HLCPDVQ> .
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bbakerman
bbakerman merged commit 9616132 into graphql-java:master May 14, 2019
@bbakerman bbakerman added this to the 13.0 milestone May 14, 2019
@bbakerman bbakerman added the needs to be backported a bugfix that still needs to be backported label May 14, 2019
bbakerman pushed a commit to bbakerman/graphql-java that referenced this pull request Jun 12, 2019
@wasche @bbakerman
fixes graphql-java#1524 (graphql-java#1525)
2354116
* fixes graphql-java#1524

* fixes graphql-java#1524
@bbakerman bbakerman mentioned this pull request Jun 12, 2019
backport of 1525 - performant error path tracking #1573
Merged
bbakerman pushed a commit that referenced this pull request Jun 12, 2019
@wasche @bbakerman
fixes #1524 (#1525)
25c8232
* fixes #1524

* fixes #1524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs to be backported a bugfix that still needs to be backported

Projects

None yet

Milestone

13.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@wasche @bbakerman @samkline
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.