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

3.x: Performance improvements (tracking issue) #5913

Closed
1 of 9 tasks
akarnokd opened this issue Mar 14, 2018 · 7 comments
Closed
1 of 9 tasks

3.x: Performance improvements (tracking issue) #5913

akarnokd opened this issue Mar 14, 2018 · 7 comments

Comments

@akarnokd
Copy link
Member

akarnokd commented Mar 14, 2018

I assembled a fresh evaluation of RxJava 1, 2 and Reactor 3.2 performance under various usages and found the following deficiencies in RxJava 2.

  • Flowable.empty() appears to be consuming a lot of memory.
  • See if a non-trampolining Schedulers.from could improve async/pipeline performance.
  • Check why Observable.blockingLast has 30% more overhead than its Flowable counterpart.
  • Check why there is a lot more overhead with ReplayProcessor and ReplaySubject compared to v1.
  • Check why there is a lot more overhead with UnicastProcessor and UnicastSubject compared to v1.
  • Check why Observable.fromArray is somewhat slower with longer sources than Flowable.
  • Check why Observable.fromIterable is slower with longer sources than Flowable.
  • Optimize Observable.concatMap for scalar inner sources.
  • Check why Flowable.flatMapIterable is drastically slower than Observable and Reactor's version in just/range/crossmap scenarios.
@akarnokd akarnokd added this to the 2.2 milestone Mar 14, 2018
@ayudovin
Copy link

ayudovin commented Apr 9, 2018

Hi, I'd like to check why you have a performance problem in this moment
if I had found the reason that Would I have opportunity to create a merge request with solution ?

@akarnokd
Copy link
Member Author

akarnokd commented Apr 9, 2018

@ayudovin Sure.

@akarnokd
Copy link
Member Author

akarnokd commented Apr 9, 2018

Flowable.empty() was simply a measurement anomaly due to class loading.

@akarnokd akarnokd modified the milestones: 2.2, 2.2 backlog Jul 18, 2018
@akarnokd akarnokd added 3.x and removed 2.x labels Jun 19, 2019
@akarnokd akarnokd changed the title 2.x: Performance improvements (tracking issue) 3.x: Performance improvements (tracking issue) Jun 19, 2019
@akarnokd akarnokd modified the milestones: 2.2 backlog, 3.0 Jul 3, 2019
@akarnokd akarnokd modified the milestones: 3.0, 3.1 Jan 29, 2020
@SergejIsbrecht
Copy link
Contributor

@akarnokd , how do you want to measure it? As you are aware certainly aware, there are different implementations C1, C2 (Hotspot), ART, Graal. Which compilation stage do you want to perform better and which implementation should be the baseline?

I would suggest using OpenJDK 11 with C2 Hotspot with default setting tested via JMH.

Furthermore, which metric should be improved? Allocation-Rate/ Operations per Second?

@akarnokd
Copy link
Member Author

You can try that. Ops/second is the usual measure for us.

@akarnokd akarnokd modified the milestones: 3.1, 3.1-support Aug 10, 2021
@MaratCrash
Copy link

@akarnokd hi, is it actual issue for now?

@akarnokd
Copy link
Member Author

Different JVM versions give different results and I don't see any clear optimizations to make them better across. I'll close it for now.

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

No branches or pull requests

4 participants