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

fix(onErrorResumeNext): no longer holds onto subscriptions too long #3289

Merged
merged 2 commits into from
Feb 2, 2018

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Feb 2, 2018

Reduces the size of onErrorResumeNext.

Fixes an issue where onErrorResumeNext was holding onto all inner subscriptions for the lifetime of the resulting observable.

Updates documentation

related #2459
closes #3178

@rxjs-bot
Copy link

rxjs-bot commented Feb 2, 2018

Messages
📖

CJS: 1362.4KB, global: 729.1KB (gzipped: 117.8KB), min: 140.7KB (gzipped: 30.6KB)

Generated by 🚫 dangerJS

@coveralls
Copy link

coveralls commented Feb 2, 2018

Coverage Status

Coverage increased (+0.008%) to 97.51% when pulling b781e27 on benlesh:onErrorResumeNext-fn into d487d6b on ReactiveX:master.


protected _error(err: any): void {
this.subscribeToNextSource();
if (sources.length === 1 && isArray(first)) {
Copy link
Member

@david-driscoll david-driscoll Feb 2, 2018

Choose a reason for hiding this comment

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

Is there any perf win/loss if we avoid the above variable allocations by moving this before the destructure assigment, and use isArray(sources[0])?

Copy link
Member Author

Choose a reason for hiding this comment

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

It would probably be a slight perf loss, as you'd need to look up first by index twice.

Copy link
Member

@david-driscoll david-driscoll left a comment

Choose a reason for hiding this comment

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

LGTM, one small nit, which is probably not important.

@benlesh benlesh merged commit c4756c3 into ReactiveX:master Feb 2, 2018
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants