Skip to content
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

feat(operators)!: introduce a buffer size parameter to Multi::emitOn #1761

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

jponge
Copy link
Member

@jponge jponge commented Dec 9, 2024

The operator was previously using a hard-coded buffer size of 16 elements which was also used to batch upstream demand.
This was a performance bottleneck for large streams as observed in the field.

The existing Multi::emitOn(executor) method remains, but it now uses Infrastructure.getBufferSizeS() as a default buffer size instead of 16.

We do not expect existing usages of emitOn(executor) to be affected by this internal change.

Fixes: #1758
See-Also: quarkusio/quarkus#36177

The operator was previously using a hard-coded buffer size of 16 elements which was
also used to batch upstream demand.
This was a performance bottleneck for large streams as observed in the field.

The existing Multi::emitOn(executor) method remains, but it now uses
Infrastructure.getBufferSizeS() as a default buffer size instead of 16.

We do not expect existing usages of emitOn(executor) to be affected by this internal change.

Fixes: smallrye#1758
See-Also: quarkusio/quarkus#36177
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.45%. Comparing base (38be323) to head (2d225a8).
Report is 20 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1761      +/-   ##
============================================
- Coverage     89.48%   89.45%   -0.03%     
+ Complexity     3287     3281       -6     
============================================
  Files           458      458              
  Lines         13365    13368       +3     
  Branches       1651     1651              
============================================
- Hits          11960    11959       -1     
- Misses          787      792       +5     
+ Partials        618      617       -1     
Files with missing lines Coverage Δ
...tation/src/main/java/io/smallrye/mutiny/Multi.java 94.44% <ø> (ø)
...va/io/smallrye/mutiny/operators/AbstractMulti.java 100.00% <100.00%> (ø)
...smallrye/mutiny/operators/multi/MultiEmitOnOp.java 91.42% <100.00%> (-1.91%) ⬇️

... and 9 files with indirect coverage changes

@cescoffier cescoffier merged commit 4136156 into smallrye:main Dec 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi emitOn has a hard-coded limit that yields small request batches of 16 elements
2 participants