-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add new ConsumerSettings::enableOptimisticResume
setting (true
by default) to allow users to disable the "optimistic resume" optimisation && Write benchmarks where this optimisation is disabled
#889
Conversation
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.
There is no reason to inline Chunk.foreach
and I prefer positive wording for the feature name. Otherwise this PR LGTM.
BTW, I didn't check the benchmark related code in detail.
zio-kafka/src/main/scala/zio/kafka/consumer/ConsumerSettings.scala
Outdated
Show resolved
Hide resolved
zio-kafka/src/main/scala/zio/kafka/consumer/internal/Runloop.scala
Outdated
Show resolved
Hide resolved
ConsumerSettings::disableOptimisticResume
setting to allow users to disable the "optimistic resume" optimisation && Write benchmarks where this optimisation is disabledConsumerSettings::enableOptimisticResume
setting (true
by default) to allow users to disable the "optimistic resume" optimisation && Write benchmarks where this optimisation is disabled
I just re-organised and copy/pasted the already existing benchmarks. |
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.
I am still wondering if we should call the setting optimisticResume
instead of enableOptimisticResume
🤷
|
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.
Good for users to be able to toggle this feature to see the effect on performance
…users to disable the "optimistic resume" optimisation && Write benchmarks where this optimisation is disabled
e4ae988
to
aa9c153
Compare
04934a1
to
bf4f562
Compare
Benchmark results
Before
After
Observations
Interestingly, the optimistic resume optimisation seems to be very detrimental to the manual consumption performances