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

Serialize query response directly to Servlet's output stream to avoid intermediate String object creation #215

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

shailender-bathula
Copy link
Contributor

I checked this improvement using this test customers query shailender-bathula/samples@fd1bf6d and bombardier HTTP benchmarking tool.

I ran the application using the default settings i.e. ../gradlew appRun and benchmarking like this:
bombardier --method POST --header "Content-Type: application/json" --duration=70s --connections=110 --body '{ "query": "{ customers {id firstName lastName yearOfBirth email} }" }' http://localhost:8080/servlet-hello-world/graphql

There was an improvement of 5 - 10 requests/second before and after in those tests. The difference may be more in higher throughput environments.

@oliemansm oliemansm merged commit 45033b0 into graphql-java-kickstart:master Nov 14, 2019
@oliemansm oliemansm added this to the 8.1.0 milestone Nov 14, 2019
@oliemansm oliemansm modified the milestones: 8.1.0, 9.0.0 Nov 28, 2019
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