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

有针对RxJava1.x的实现吗? #1

Open
jinshiyi11 opened this issue May 8, 2021 · 4 comments
Open

有针对RxJava1.x的实现吗? #1

jinshiyi11 opened this issue May 8, 2021 · 4 comments

Comments

@jinshiyi11
Copy link

我看有RxJava2.x和RxJava3.x的分支,但是没有RxJava1.x的,是因为RxJava1.x没有相关的hook接口吗?

@YvesCheung
Copy link
Owner

应该也是有的,只是因为懒,觉得用1.x的不多

@YvesCheung
Copy link
Owner

有没有兴趣PR一个

@jinshiyi11
Copy link
Author

有没有兴趣PR一个

原本打算基于RxJava1.x实现一个,但是我们这边有些场景需要分析调用链,比如subscribeOn(Schedulers.io).observeOn(AndroidSchedulers.mainThread).map.subscribeOn(Schedulers.io).observeOn(AndroidSchedulers.mainThread)这种场景,
我实现了另外一种方案,通过rx.plugins.RxJavaObservableExecutionHook#onSubscribeStarthook RxJava的subscribe调用,然后通过反射分析出调用链,再根据调用链分析是否存在多余线程调度。相对于在运行时减少线程调度,改为在开发调试阶段发现问题并报告问题,目前还在观察效果

@YvesCheung
Copy link
Owner

开发期间发现问题也可以。但长时间要团队所有开发者都有这个意识不容易

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

No branches or pull requests

2 participants