-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Description
While looking for emissions after terminal events I was looking at OperatorDoEach which is called by doOnNext, doOnError, doOnCompleted, and doOnEach of course. I noticed these things:
- lots of wasted allocations per call (use of
ActionSubscriberwhen all that is needed is anActionObserver) and passing three actions toOperatorDoEachwhen for three of the four operators we only need one action. - it doesn't call
RxJavaHooks.errorfor secondary error emissions from upstream - it does call
Exceptions.throwIfFatalfor all error emissions (do we want to do this generally? I haven't seen it much outside error catching on externally supplied functions or actions)
I'd quite like to see doOnNext and doOnError in particular more efficient because I use them a lot. Should I create dedicated Operator/OnSubscribe classes for the single action operators or perhaps one shared one that has an extra parameter (to indicate what notification type is being used)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels