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

Improve server web socket performance. #3397

Closed
kamilkloch opened this issue Dec 13, 2023 · 2 comments · Fixed by #3393
Closed

Improve server web socket performance. #3397

kamilkloch opened this issue Dec 13, 2023 · 2 comments · Fixed by #3393
Milestone

Comments

@kamilkloch
Copy link
Contributor

Tapir layer for web sockets adds a considerable overhead, when compared to raw http4s + blaze:

http4s + blaze:

#[Mean    =        0.025, StdDeviation   =        0.157]
#[Max     =        3.000, Total count    =      6000000]

tapir + blaze:

#[Mean    =       41.509, StdDeviation   =       57.180]
#[Max     =      748.000, Total count    =      6000000]

Screenshot from 2023-12-13 16-27-37

Repo with benchmark: https://github.com/kamilkloch/websocket-benchmark/tree/master/results

@adamw adamw added this to the Performance milestone Dec 14, 2023
@kciesielski
Copy link
Member

@kamilkloch thanks a lot for testing the performance overhead and sharing test sources + results! We are now starting to work on extending our perf tests. Is it OK if we use your code in our tests, of course with proper attribution?

@kamilkloch
Copy link
Contributor Author

kamilkloch commented Dec 14, 2023

Sure thing. That is also work of @plokhotnyuk.
The repo is currently not quite up-to-date, we were planning to re-run the benchmarks once the new tapir has landed ;)

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.

3 participants