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

1.x: rework Single internals to reduce overhead and stack depth #4648

Merged
merged 2 commits into from
Oct 2, 2016

Conversation

akarnokd
Copy link
Member

This PR makes the Single.OnSubscribe as the primary means to execute the subscribe action in Single and former couple of reused Observable operators are now recreated with Single.OnSubscribe.

Because Single is now marked final, we can't remove the former Observable.Operator and Observable.OnSubscribe entry points (but may be deprecated in a separate PR).

@akarnokd akarnokd added this to the 1.3 milestone Sep 30, 2016
@codecov-io
Copy link

codecov-io commented Sep 30, 2016

Current coverage is 84.03% (diff: 64.75%)

Merging #4648 into 1.x will decrease coverage by 0.44%

@@                1.x      #4648   diff @@
==========================================
  Files           274        288    +14   
  Lines         17766      17991   +225   
  Methods           0          0          
  Messages          0          0          
  Branches       2727       2749    +22   
==========================================
+ Hits          15009      15119   +110   
- Misses         1889       1996   +107   
- Partials        868        876     +8   

Powered by Codecov. Last update 2b47efe...7a4d353


@Override
public void call(SingleSubscriber<? super T> t) {
// TODO Auto-generated method stub
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

* Creates a Single with a Function to execute when it is subscribed to (executed).
* <p>
* <em>Note:</em> Use {@link #create(OnSubscribe)} to create a Single, instead of this constructor,
* unless you specifically have a need for inheritance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also @Deprecate this constructor.

* Creates a Single with a Function to execute when it is subscribed to (executed).
* <p>
* <em>Note:</em> Use {@link #create(OnSubscribe)} to create a Single, instead of this constructor,
* unless you specifically have a need for inheritance.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@akarnokd akarnokd merged commit 843a57e into ReactiveX:1.x Oct 2, 2016
@akarnokd akarnokd deleted the SingleInternalsRewrite branch October 2, 2016 10:10
@akarnokd akarnokd mentioned this pull request Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants