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: NotificationLite - reduce allocations #4621

Merged

Conversation

davidmoten
Copy link
Collaborator

A lot of commonly used operators allocated an instance of NotificationLite as a field in a subscriber but for no great type-safety benefit. I've cut these fields by converting all instance methods of NotificationLite to static methods and removing the NotificationLite.instance() method.

The changes are trivial till you get to the Subjects that would pass instances of NotificationLite in methods of the SubjectSubscriptionManager. Still simple changes but reviewing these is a good idea.

RxJava2 goes a bit further in the internals of NotificationLite. I'd like to leave changes to the internals beyond making methods static for another PR if appropriate.

@davidmoten davidmoten changed the title NotificationLite - reduce allocations 1.x: NotificationLite - reduce allocations Sep 28, 2016
@codecov-io
Copy link

codecov-io commented Sep 28, 2016

Current coverage is 84.66% (diff: 78.12%)

Merging #4621 into 1.x will increase coverage by 0.15%

@@                1.x      #4621   diff @@
==========================================
  Files           274        274          
  Lines         17807      17766    -41   
  Methods           0          0          
  Messages          0          0          
  Branches       2727       2727          
==========================================
- Hits          15049      15042     -7   
+ Misses         1887       1860    -27   
+ Partials        871        864     -7   

Powered by Codecov. Last update 2e06d4e...6492f66

@akarnokd akarnokd merged commit 2b47efe into ReactiveX:1.x Sep 28, 2016
@akarnokd akarnokd mentioned this pull request Oct 2, 2016
lfielke pushed a commit to NextFaze/RxRelay that referenced this pull request Oct 6, 2016
lfielke pushed a commit to NextFaze/RxRelay that referenced this pull request Oct 6, 2016
- Fixes RxJava implementation changes for NotificationLite in ReactiveX/RxJava#4621
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.

None yet

3 participants