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 Http4sServerRequest.uri #3546

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

Optimize Http4sServerRequest.uri #3546

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

Comments

@kciesielski
Copy link
Member

It takes quite a lot of CPU to construct the Uri with

Uri.unsafeParse(req.uri.toString())

Both conversion of http4s Uri to String, and the unsafeParse from sttp-model are costly, so we could probably just build the Uri manually to save some CPU. This overhead is especially visible when running performance tests with DefaultServerLog enabled (see #3272).

@kciesielski kciesielski added this to the Performance milestone Feb 29, 2024
@kciesielski kciesielski linked a pull request Feb 29, 2024 that will close this issue
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