Open beligante opened 1 year ago
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.
Gotcha! I'll work on the script for Benchee (which - TIL about the lib) and see what are the results. Tks Paulo!
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 runmix 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: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:
Additional context A few things that I could observer from the current implementation that could be better:
Accesss
- According to this article this action is quite slow: https://medium.com/learn-elixir/speed-up-data-access-in-elixir-842617030514I'm open for investigate and fix this issue and also I'm quite open for suggestions.