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

Removed TERMINATED check in onNext #5942

Merged
merged 2 commits into from
Apr 1, 2018
Merged

Removed TERMINATED check in onNext #5942

merged 2 commits into from
Apr 1, 2018

Conversation

kjkrum
Copy link
Contributor

@kjkrum kjkrum commented Mar 31, 2018

TERMINATED is an empty array, so iterating over it would be harmless. The cost of the check is probably minuscule, but it was imposed on the common case where the subject is not terminated. In essence, it was optimizing for misuse of the API.

@codecov
Copy link

codecov bot commented Mar 31, 2018

Codecov Report

Merging #5942 into 2.x will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##                2.x   #5942      +/-   ##
===========================================
- Coverage     98.23%   98.2%   -0.03%     
+ Complexity     6016    6015       -1     
===========================================
  Files           656     656              
  Lines         44040   44036       -4     
  Branches       6102    6100       -2     
===========================================
- Hits          43262   43247      -15     
- Misses          232     237       +5     
- Partials        546     552       +6
Impacted Files Coverage Δ Complexity Δ
...ain/java/io/reactivex/subjects/PublishSubject.java 100% <ø> (ø) 38 <0> (-1) ⬇️
...java/io/reactivex/processors/PublishProcessor.java 100% <ø> (ø) 43 <0> (-1) ⬇️
...l/operators/observable/ObservableFlatMapMaybe.java 90.19% <0%> (-5.89%) 2% <0%> (ø)
...nternal/operators/parallel/ParallelReduceFull.java 91.08% <0%> (-3.97%) 2% <0%> (ø)
...ternal/operators/observable/ObservablePublish.java 96.46% <0%> (-2.66%) 11% <0%> (+1%)
...va/io/reactivex/internal/queue/SpscArrayQueue.java 97.61% <0%> (-2.39%) 22% <0%> (-1%)
.../operators/observable/ObservableFlatMapSingle.java 89.55% <0%> (-2.24%) 2% <0%> (ø)
...nternal/operators/parallel/ParallelSortedJoin.java 92.7% <0%> (-2.19%) 2% <0%> (ø)
...x/internal/operators/flowable/FlowablePublish.java 97.02% <0%> (-2.13%) 11% <0%> (ø)
...activex/internal/schedulers/ScheduledRunnable.java 98.07% <0%> (-1.93%) 29% <0%> (-1%)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bd4ac2...6dd7025. Read the comment docs.

@akarnokd
Copy link
Member

Could you also update PublishProcessor?

@kjkrum
Copy link
Contributor Author

kjkrum commented Apr 1, 2018

@akarnokd Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants