What are the actual benefits of Observable over Flowable?

In contrast to 2.0, the differences between Observableand Flowable. However, it Observableis mainly described in terms of opportunities that it lacks compared to Flowable. There is only one distinguishing feature Observable:

Use Observablehas lower overhead than Flowable.

But even this, it seems, contradicts the assumption that it is Observablepreferable for a small number of elements and most likely will lead to OutOfMemoryErrorif too many are specified. This seems to suggest that it is Flowableusually more effective.

Another thing that I am confused about is that if it Observableis preferable to use with less than 1K elements, and it Flowableis preferable to use with more than 10K elements, then cases with between 1K and 10K elements of the gray area are used.

Is there a more technical explanation for the differences between Observableand Flowable? . This is especially true for practical heuristics for deciding what to use in the gray area between 1K and 10K elements, or when the number of elements is unknown or may change.

Related: This Q&A cites the documentation without further explanation.

+4
source share
2

Observable Flowable?

, .

Observable , Flowable.

, Observable - Flowable , , .

...

, Observable , , . , Observable.flatMapIterable , Iterable onNext. Flowable , , , "-" .

, Flowable .

( , GC) .

, 1K 10K , .

, , , , / ..

Observable "longest", , , , 1000 , , , 1 .

"":

  • ?
  • , ?
  • ?
  • - ?
  • ?

"" , Flowable.

+5

Observable Flowable . Flowable , , :

Observable , Microsoft ReactiveX. , RxJava ReactiveX.

Flowable Observable ( ) . , Java .

0

Source: https://habr.com/ru/post/1675756/


All Articles