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(bufferCount): will behave as expected when startBufferEvery is … #2076

Merged
merged 3 commits into from
Oct 26, 2016
Merged

fix(bufferCount): will behave as expected when startBufferEvery is … #2076

merged 3 commits into from
Oct 26, 2016

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Oct 25, 2016

…greater than bufferSize

  • fixed issue where internal buffers store was keeping an additional buffer for no good reason
  • improved logic and performance around updating internal buffers list
  • adds a test to ensure proper behavior

fixes #2062

@benlesh
Copy link
Member Author

benlesh commented Oct 25, 2016

Worth noting, performance improves here as well:

This branch:

                                         |                     RxJS 4.1.0 |                RxJS 5.0.0-rc.1 |          factor |      % improved
---------------------------------------------------------------------------------------------------------------------------------------------------
                 buffercount - immediate |                24,789 (±0.76%) |               455,692 (±0.57%) |          18.38x |        1,738.3%
                             buffercount |                19,820 (±1.55%) |               242,544 (±1.45%) |          12.24x |        1,123.7%

master:

                                         |                     RxJS 4.1.0 |                RxJS 5.0.0-rc.1 |          factor |      % improved
---------------------------------------------------------------------------------------------------------------------------------------------------
                 buffercount - immediate |                25,716 (±0.73%) |               403,000 (±0.87%) |          15.67x |        1,467.1%
                             buffercount |                19,664 (±1.47%) |               226,951 (±1.35%) |          11.54x |        1,054.1%

@jayphelps
Copy link
Member

@Blesh #2062 is actually the opposite, startBufferEvery is less than bufferSize. (the PR description says this fix is for when startBufferEvery is greater than bufferSize)

@benlesh
Copy link
Member Author

benlesh commented Oct 25, 2016

haha... @jayphelps oops.

…less than `bufferSize`

- fixed issue where internal `buffers` store was keeping an additional buffer for no good reason
- improved logic and performance around updating internal `buffers` list
- adds a test to ensure proper behavior

fixes #2062
@benlesh
Copy link
Member Author

benlesh commented Oct 25, 2016

Also, I checked windowCount, and it does not have the same issue.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 97.214% when pulling 1787b6e on blesh:bufferCount-fix into 260d335 on ReactiveX:master.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling eb11bb8 on blesh:bufferCount-fix into * on ReactiveX:master*.

@coveralls
Copy link

coveralls commented Oct 26, 2016

Coverage Status

Coverage decreased (-0.003%) to 97.214% when pulling dde5d8d on blesh:bufferCount-fix into 0271fab on ReactiveX:master.

@benlesh
Copy link
Member Author

benlesh commented Oct 26, 2016

FYI: I think the coverage zero tolerance is getting us here with an unfortunate mathematical jump.

@jayphelps jayphelps merged commit d13dbb4 into ReactiveX:master Oct 26, 2016
@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.

Issue with bufferCount?
3 participants