-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
2.x: Dedicated {Single|Maybe}.flatMap{Publisher|Observable} & andThen(Observable|Publisher) implementations #6024
Conversation
|
||
@Override | ||
public void onComplete() { | ||
ObservableSource<? extends R> p = other; |
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.
o
|
||
@Override | ||
public void onSuccess(T t) { | ||
ObservableSource<? extends R> p; |
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.
o
|
||
@Override | ||
public void onSuccess(T t) { | ||
ObservableSource<? extends R> p; |
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.
o
Benchmark comparison with baseline: (i7 4770K, Windows 7 x64, Java 8u172, JMH 1.20): Other that 3 cases with slightly degraded throughput (probably Windows related), these are nice improvements. Comparing These should be practically the same. There is also a slight performance drop for |
Codecov Report
@@ Coverage Diff @@
## 2.x #6024 +/- ##
============================================
+ Coverage 98.27% 98.28% +<.01%
- Complexity 6161 6173 +12
============================================
Files 660 665 +5
Lines 44557 44717 +160
Branches 6201 6205 +4
============================================
+ Hits 43790 43948 +158
- Misses 228 233 +5
+ Partials 539 536 -3
Continue to review full report at Codecov.
|
/cc @davidmoten |
This PR implements the following operators directly instead of conversions between base types:
Single.flatMapObservable
Maybe.flatMapObservable
Maybe.flatMapPublisher
Completable.andThen(Observable)
Completable.andThen(Publisher)
The
Single.flatMapPublisher
was reimplemented in #6021 already.