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

Issue/5739 smaller operator creation #5742

Merged
merged 12 commits into from
Sep 23, 2020

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Sep 23, 2020

  • Adds new operate function for creating operators
  • Replaces all lift and wrappedLift helpers.
  • Fixes an issue with publishReplay et al, where an error thrown in the selector function was being thrown externally instead of send to the subscriber via an error notification.

Further size reduction.

57K -> 55K
57K -> 54K approximately

image

src/internal/util/lift.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

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

LGTM, but there are a bunch of return statements in the operators that I think aren't needed. And I have a few nitpicks.

src/internal/util/lift.ts Outdated Show resolved Hide resolved
src/internal/operators/bufferToggle.ts Outdated Show resolved Hide resolved
src/internal/operators/combineLatestWith.ts Show resolved Hide resolved
src/internal/operators/count.ts Outdated Show resolved Hide resolved
src/internal/operators/filter.ts Outdated Show resolved Hide resolved
src/internal/operators/takeWhile.ts Outdated Show resolved Hide resolved
src/internal/operators/tap.ts Outdated Show resolved Hide resolved
src/internal/operators/raceWith.ts Show resolved Hide resolved
src/internal/operators/zipWith.ts Outdated Show resolved Hide resolved
src/internal/operators/refCount.ts Outdated Show resolved Hide resolved
src/internal/util/lift.ts Outdated Show resolved Hide resolved
@benlesh
Copy link
Member Author

benlesh commented Sep 23, 2020

HA! While fixing the stuff @cartant pointed out, I updated onErrorResumeNext, retry and repeat, and knocked us down another 1K almost.

…in a selector appropriately

- Also refactors multicast to use the new `operate` mechanism.
…tions can no longer be returned

This will help force us to make sure we are using the subscriber and subscription chaining in the most efficient way possible. Although it could result in anti-patterns where users return a function that calls unsubscribe on a subscription if we release this to the public.
@benlesh benlesh force-pushed the issue/5739-smaller-operator-creation branch from f73e056 to 7c694b6 Compare September 23, 2020 19:54
@benlesh benlesh merged commit 31fd513 into ReactiveX:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants