These are chat archives for ReactiveX/RxJava

9th
Mar 2018
Yannick Lecaillez
@ylecaillez
Mar 09 2018 07:28
Give. That flatMapCompletable mostly perform only this add/remove and given the previous number of the Fixed disposable, I don't understand these results :-(
How many thread involved in the asynchronously version ? One thread per publisher ?
David Karnok
@akarnokd
Mar 09 2018 08:49
There is the concurrency parameter which defines the thread count, but this was a 4/8 CPU running with the standard scheduler infrastructure, all of which have so much additional overhead that the changes didn't really matter. This happens sometimes with RxJava. On the component level, it looks like a promising improvement but on the integrated level, things don't improve after all.
Eugene Popovich
@httpdispatch
Mar 09 2018 09:40

@httpdispatch In your case, the setup is synchronous so by the time the second subscribe is called, the share has completed and reset to its unconnected state. The next subscribe will trigger a fresh connection and thus repeat the synchronous part again. You should consider using cache() or replay().autoConnect().

@akarnokd thank you very much for the explanation

Yannick Lecaillez
@ylecaillez
Mar 09 2018 09:42
Too bad... anyway, thank you for the investigations !