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

Optimize costly operations for pekko-http server #3544

Closed
kciesielski opened this issue Feb 29, 2024 · 0 comments · Fixed by #3575
Closed

Optimize costly operations for pekko-http server #3544

kciesielski opened this issue Feb 29, 2024 · 0 comments · Fixed by #3575
Assignees
Milestone

Comments

@kciesielski
Copy link
Member

kciesielski commented Feb 29, 2024

When running performance tests, I found some operations that take some noteworthy CPU time:

  • sttp.tapir.server.pekkohttp.PekkoServerRequest.acceptsContentTypes() 2.4%
  • sttp.tapir.server.pekkohttp.PekkoToResponseBody.parseContentType(String) 3.53%
  • sttp.tapir.server.pekkohttp.PekkoModel$.parseHeadersOrThrowWithoutContentHeaders(HasHeaders) 2.34%

These operations run header parsers from sttp-model underneath, which are expensive mostly because they use regular expressions, like Accepts.parse.

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 a pull request may close this issue.

1 participant