Last active
August 29, 2015 14:26
-
-
Save artem-zinnatullin/51b6c6720ecb8a2a71eb to your computer and use it in GitHub Desktop.
Fix for performance issue in RxJava 1.0.3+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Issue: https://github.com/ReactiveX/RxJava/issues/3119 | |
class YourApp extends Application { | |
static { | |
// I recommend you to put this code into static initialization block of Application class | |
// because Application class will be loaded before you will start doing some work via RxJava | |
// PLEASE add comment "remove fix from app class… when you'll switch to new version of RxJava" | |
// near to "compile 'io.reactivex:rxjava:1.0.13'" in your build.gradle | |
System.setProperty("rx.scheduler.jdk6.purge-force", "true"); | |
// Please read changelogs of new RxJava releases and remove this workaround when problem will be fixed | |
// I hope fix https://github.com/ReactiveX/RxJava/pull/3121 will be merged into RxJava 1.0.14 | |
// Notice, this issue also affects non-Android systems: backends, etc, | |
// because RxJava 1.0.13 does not cache reflection call. You can apply this to your backend apps too. | |
} | |
} | |
// PR with fix: https://github.com/ReactiveX/RxJava/pull/3121 | |
// Feel free to contact me: https://twitter.com/artem_zin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please don't use it anymore, RxJava 1.0.14 has fix for this problem.