Experiment faster stateful implement - #493
Conversation
| private var cancel: Cancel = Noop | ||
|
|
||
| override def onCancel(): Unit = | ||
| cancel() |
There was a problem hiding this comment.
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.
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