Skip to content

2.x: prepare the operator-fusion enhancement #4103

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

Merged
merged 1 commit into from
Jun 24, 2016

Conversation

akarnokd
Copy link
Member

This PR adds 3 operator-fusion related interfaces:

  • QueueSubscription will support fusion for Flowable - avoid creating queues, avoid cost of multiple enqueue-dequeue, reduce request() overhead
  • QueueDisposable will support fusion for Observable - avoid creating queues, avoid cost of multiple enqueue-dequeue
  • ScalarCallable - indicate a scalar constant source

In addition ConditionalSubscriber is marked and will be moved to the new package and its method renamed to tryOnNext.

Unlike Reactor-Core (and Rsc), there is no Fuseable marker interface. The ability of fusing is indicated by calling onSubscribe with the above QueueX enabled instances and then called back via requestFusion. This allows having less duplicated code compared to Reactor/Rsc - at the cost of usually one extra field to store the QueueX value that may be null.

@akarnokd akarnokd added this to the 2.0 RC 1 milestone Jun 24, 2016
@codecov-io
Copy link

Current coverage is 70.09%

Merging #4103 into 2.x will decrease coverage by 0.01%

@@                2.x      #4103   diff @@
==========================================
  Files           380        380          
  Lines         26985      26985          
  Methods           0          0          
  Messages          0          0          
  Branches       4331       4331          
==========================================
- Hits          18919      18916     -3   
- Misses         6155       6159     +4   
+ Partials       1911       1910     -1   

Powered by Codecov. Last updated by e9fad24...97801d4

@akarnokd akarnokd merged commit 7ffed1b into ReactiveX:2.x Jun 24, 2016
@akarnokd akarnokd deleted the Fuseable branch June 24, 2016 10:38
@artem-zinnatullin
Copy link
Contributor

Nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants