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

BIG: Subject rewrite #1701

Merged
merged 11 commits into from
May 22, 2016
Merged

BIG: Subject rewrite #1701

merged 11 commits into from
May 22, 2016

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented May 11, 2016

This is a rewrite of Subjects for RxJS 5 with the following effects:

  • Better align with RxJS 4 behaviors around disposal and when ObjectUnsubscribedError is thrown
  • Cleans up Subject implementation and separates out AnonymousSubject as a different class.
  • This is prep work for a few fixes in ConnectableObservable.

This is a big set of changes. Breaking changes are listed in the commit.

Attn: @trxcllnt @mattpodwysocki @staltz @kwonoj @jayphelps

@benlesh
Copy link
Member Author

benlesh commented May 11, 2016

NOTE: Also fixes the behavior of groupBy to more closely match that of RxJS 4. (@staltz, I think you originally wrote those tests, can you verify?)

Once the Subjects were refactored to match Rx 4 behavior, groupBy was broken, in looking into that, it seemed the behavior was slightly different as well. So I fixed groupBy and some tests.

super();
this.scheduler = scheduler;
this.bufferSize = bufferSize < 1 ? 1 : bufferSize;
this._windowTime = windowTime < 1 ? 1 : windowTime;
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like these should have a consistent naming scheme. Either use the prefixed '_' or don't.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree... but that's been sitting there, and I was already knee-deep in yak hair.

@jadbox
Copy link
Contributor

jadbox commented May 16, 2016

Any performance impact of the rewrite?

@benlesh
Copy link
Member Author

benlesh commented May 22, 2016

@jadbox overall the tests seem to be positive, in that this is a little faster. However, the tests I wrote were having some issues where V8 was optimizing benchmark.js itself WRT the Subject microperf tests. So I didn't commit those tests specifically. We'll need to move to more macro perf tests.

@benlesh benlesh deleted the subject-rewrite branch December 16, 2016 03:15
@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.

7 participants