Skip to content

Conversation

@akarnokd
Copy link
Member

Benchmarks the behavior of publish() in face of number of child subscribers, batching effect in request(), length of the source and whether or not each child observes values on a separate thread.

Benchmark results

Remarks:

  • With no subscribers, the operator seems to fill its queue and then do nothing unless someone subscribes. There is no test to check for this behavior so it might be a bug or a feature.
  • In async mode, the benchmark threw MissingBackpressureException a lot of times which can happen with a single subscriber as well, so it might be some concurrency bug in the operator.

akarnokd added a commit that referenced this pull request Apr 23, 2015
@akarnokd akarnokd merged commit 5b75d32 into ReactiveX:1.x Apr 23, 2015
@akarnokd akarnokd deleted the OperatorPublishPerf branch April 23, 2015 14:01
@benjchristensen
Copy link
Member

The operator seems to fill its queue and then do nothing unless someone subscribes

I remember this being talked about at some point and an agreement that this is wrong behavior. If there are no subscribers it should just ignore/drop the data.

@benjchristensen
Copy link
Member

Agreed that throwing a MissingBackpressureException a lot sounds like a problem.

@benjchristensen benjchristensen mentioned this pull request Apr 30, 2015
@akarnokd
Copy link
Member Author

There shouldn't be any MBE because every component supports backpressure. There is a request accounting problem somewhere but this is now irrelevant. The new OperatorPublish works without throwing MBE.

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.

2 participants