-
Notifications
You must be signed in to change notification settings - Fork 400
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
Client Performance Not Great OOTB #2117
Comments
To be specific, performance goals of this ticket should be:
Essentially, out of the box experience should be measurably better than what one could obtain using /bounty $600 |
|
Yup! Thanks for the clarified goals. |
Hi! I would like to work on this! I saw that comments on newer PRs say that I should type /attempt #2217 in order to start, but the older ones don't. Should I do it anyway? |
@tachyonicbytes I think either way is fine! Most important thing is just to let other people know you are working on it which you already have! 😃 |
Yeah, algora-pbc[bot] already gave me the rocket emoji, so I guess I did what it wanted |
Is anyone still working on this? If not then I'll take it! Options |
@jdegoes Hi, I want to gain more context on this:
Why do you think we should be measurably faster (And by how much in your estimate?). Where does the win come from :)? |
Note: The user @lackhoa is already attempting to complete issue #2117 and claim the bounty. If you attempt to complete the same issue, there is a chance that @lackhoa will complete the issue first, and be awarded the bounty. We recommend discussing with @lackhoa and potentially collaborating on the same solution versus creating an alternate solution. |
@lackhoa: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
@abebeos What problems are you having with the bot? |
Hi @jdegoes, I've reproduced the benchmark in the ticket. The main problem with the original benchmark is that it includes the client shutdown time, for example:
Our client does take a bit of time to shutdown, but that shouldn't matter in practice because it should only be done at the end of the app anyway. Plus we've reduced that time in #2410, so it shouldn't take 2s anymore. Here's my updated benchmark, which only takes into account client creation plus request time: Sample output
So our single request time is already better than the Java client. But as you can see, the very first request is somehow very slow. I have no idea why, because all subsequent requests are fast (even if you change the host, so it doesn't have anything to do with connection pooling or DNS). I've also looked at ZKeyedPool and ZPool, and the connections are already done in the background already. Anyway in conclusion, I think we still have a problem with start-up time, but IMO it's a much smaller problem (because it's only a one-time cost, not per request). So I'll stash this one and come back when there's more input. |
@abebeos What misunderstanding did I add to the issue? Or do I have to pay thousands of dollars to find out the answer? |
No it is clearly not the main issue. Why do you think that it is? |
Ok, if you don’t want to talk, please do me a favor and never @ mention my name again. I don’t want to interact with you ever. You don’t say anything interesting anyway. |
I've updated my repo to the latest deps and re-run the tests which produce these results:
|
Based on a suggestion from @abebeos I've bumped my test to a recent zio-http SNAPSHOT and for OOTB usage I'm seeing significantly better performance!
Those initial numbers are looking much better for the OOTB usage. Not sure what changed / fixed this since RC2. |
@abebeos The bounty is for actually making the performance faster than |
Please be aware that you are delusional if you believe that this is feasible. Even a $60_000 bounty could not achieve this result.
"merely restated"... Wow! Best case scenario: you (@adamgfraser & @jdegoes ) are just to busy to take time to understand a problem-domain. I rest my case and leave it to the code-monkeys that consume anything served as-is! Cu around. @jamesward I may still keep a look on your benchmark, mostly out of curiosity (e.g. how a simple test-runner would be implemented in scala, jamesward/zio-http-client-perf#5 (comment)) |
The bounty is up for grabs! Everyone is welcome to |
@lazaridiscom: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
@abebeos: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
💡 @kyri-petrou submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @kyri-petrou has been awarded $600! 🎈🎊 |
Describe the bug
Setting up a
Client
has high overhead ~2 seconds and without connection pooling, there is ~300ms of overhead on each request. It'd be great to have better out-of-the-box performance.To Reproduce
Project to test performance: https://github.com/jamesward/zio-http-client-perf
On my connection / machine here are some results compared against the JDK's
java.net.http.HttpClient
hittinghttps://google.com
java.net.http.HttpClient
Client.default
FixedConnectionPool size 10
Expected behaviour
Lower
Client
creation overhead and lower client reuse overhead (perhapsClient.default
should use a connection pool)?The text was updated successfully, but these errors were encountered: