Comments (5)
我目前使用 kotlin mvvm 架构, 利用协程来处理 RxBus 事件, 使用时 数据处理使用后台协程(Dispatchers.IO)处理, 然后ui部分采用 ui 协程 (Dispatchers.Main)
from rxbus.
我目前使用 kotlin mvvm 架构, 利用协程来处理 RxBus 事件, 使用时 数据处理使用后台协程(Dispatchers.IO)处理, 然后ui部分采用 ui 协程 (Dispatchers.Main)
我没刻意关注耗时在subscribe / 线程切换(好像 我的case都是发生在ui线程,不存在线程切换) / oberver 具体哪个地方 ,我个人的场景是 瞬时间大量的task 加入到 flowable内。
我没了解 kotlin的协程是怎么 实现的, 根据协程的原理,只是将多个任务让一个线程去处理(我的理解对吗?), 那如果 瞬时间有多个click任务 加入到事件队列里面是否 会有执行延迟, 疑惑卡顿严重的饿问题呢??
@zhang632615 , 不知道 您那边 有 用 rxbus去 划分业务层吗, 比如click事件都使用事件(以结偶fragmenty、activity的关联),这时候是否体验依然很不错呢?
from rxbus.
我现在的项目 是个新项目 ,所以 使用rxbus来隔离的业务层,开始效果不错,也基本达到来拥抱变化的效果,但是 随着业务的庞大, 性能问题暴露的饿挺明显的, 所以我非常不建议使用rxbus来结偶业务层 ,虽然我目前没有找到 比较好的办法证明,但是 我将部分业务功能 切换回visitor模式的实现,体验有较明显的提高。
from rxbus.
我现在的项目 是个新项目 ,所以 使用rxbus来隔离的业务层,开始效果不错,也基本达到来拥抱变化的效果,但是 随着业务的庞大, 性能问题暴露的饿挺明显的, 所以我非常不建议使用rxbus来结偶业务层 ,虽然我目前没有找到 比较好的办法证明,但是 我将部分业务功能 切换回visitor模式的实现,体验有较明显的提高。
我说的“结偶业务层” 是指 把f2a,f2f里 甚至click事件的所有可能有引起耦合的逻辑都使用事件驱动。
from rxbus.
能否提供一个demo?或者将ANR日志提供下。我看下。另外,依赖看是否要升级,欢迎 pull request。
from rxbus.
Related Issues (20)
- Any plan for RxSwift 5 support?
- not support sticky event HOT 1
- 低概率挂 HOT 2
- 传递list对象时数据丢失 HOT 2
- Documentation/example is incomprehensible HOT 2
- How do you upload this library with third-party libraries? HOT 4
- support kotlin?
- No onError handle by default?
- How can I use it in Kotlin? HOT 11
- Update to Rxjava2 HOT 1
- 关于粘性事件与@produce的问题,how to handle with sticky event by '@produce' HOT 1
- @Produce 这个注解就是Post吧 HOT 2
- 有计划支持kotlin么 HOT 3
- hasRegistered函数 为什么被废弃了? HOT 4
- Not working for parent class @Subscribe methods. HOT 1
- 是否可以升级下rxjava和rxandroid的版本,现在的版本太久了,新版本很多类都没了 HOT 3
- hasRegistered is deprecated? HOT 1
- release版本出现的错误 HOT 1
- 发送一个post 接收到2次 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxbus.