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

Performance issues with Mint adapter #307

Open
beligante opened this issue Mar 13, 2023 · 2 comments
Open

Performance issues with Mint adapter #307

beligante opened this issue Mar 13, 2023 · 2 comments
Labels
Milestone

Comments

@beligante
Copy link
Contributor

Describe the bug
There are some issues with the current implementation for mint adapter from a performance standpoint.

To Reproduce
Easy way to see is In Interop tests script

If you wrap the runner with :timer.tc and run mix run script/run.exs --rounds 1 it's possible to see that the amount of time that Gun adapter takes to run all test cases vs Mint is quite different. On my machine the avg for both was:

  • 800ms for Gun
  • 5.6s for Mint

With the numbers above it's possible to assume for sure that there are some performance improvements that needs to be done for Mint adapter.

Expected behavior
Similar times for both adapters

Versions:

  • OS: Linux / Mint
  • Elixir: 1.13.3-otp-25
  • Erlang: 25.0.3

Additional context
A few things that I could observer from the current implementation that could be better:

I'm open for investigate and fix this issue and also I'm quite open for suggestions.

@beligante beligante added the bug label Mar 13, 2023
@polvalente
Copy link
Contributor

I'd look for a simpler script that benchmarks with Benchee so that things are more easily reproducible.

It could be the case that the Mint code is as fast as Gun when there's no concurrency. If this is the case, then it's a problem with process message serialization.

If even with minimal concurrency it's still much slower, then it's a matter of finding the bottleneck in the code.

@beligante
Copy link
Contributor Author

Gotcha! I'll work on the script for Benchee (which - TIL about the lib) and see what are the results. Tks Paulo!

@polvalente polvalente added this to the v0.7 milestone Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants