-
Notifications
You must be signed in to change notification settings - Fork 58
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
Experiment faster stateful implement #493
Conversation
private var cancel: Cancel = Noop | ||
|
||
override def onCancel(): Unit = | ||
cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be blocked until cancellation is completed?
@naoh87 What kind of numbers do you get if you bench this https://github.com/typelevel/fs2-grpc/pull/486/files? |
I change warm up time to 60s and run 30s for stabilize result because #486 and #493 performance is so close. This benchmark was run on MacBookPro 2019 (4 core 2.8GHz Core i7) // PS : This result is mistook measurement This PR
|
I see, not much of a difference between those two. How do you run this |
Nope. I just |
Perhaps using constructs from https://github.com/davenverse/condemned/tree/main/core/src/main/scala/io/chrisdavenport/condemned |
I mean, is ghz something you installed with brew? |
Yes. I have installed with brew.
|
Would you mind sharing the ghz command, so I could try locally here? :) |
|
Thanks 👍 |
I am really sorry about that my above benchmark has completely mistook measurement. |
I retry benchmark. But both implement are almost same peformance.
|
I was also tried start |
This result is another run of
I think this result is reasonable, because default ghz request parallelism is 50 |
I benchmarked with
https://github.com/naoh87/fs2-grpc-profile/tree/master/docs/2022-02-03 |
private val Closed: Cancel = () => () | ||
|
||
private def mkListener[F[_]: Async, Request, Response]( | ||
run: Stream[F, Request] => Cancel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement stream request Listener like unary one
Motivation
https://github.com/LesnyRumcajs/grpc_bench/wiki/2022-01-11-bench-results
Just I want to improve performance.
This PR reduce unsafeRun call to 1 and eliminate blocking.
Benchmark
scenario: https://github.com/LesnyRumcajs/grpc_bench
ghz --cpus=3 -n 100000 ...
after warm up 30sThis PR
fs2-grpc: 2.4.4
ScalaPB