Skip to content

Commit f72b124

Browse files
committed
update readme.md
1 parent ac07ab9 commit f72b124

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,15 @@ private void onEventMainThread(User aUser) {
143143
```
144144

145145
If there are two receiving functions of the same parameter type and both are executed on the main thread, how to name them distinctively? Supposing that there are two functions meeting the requirements and the event is adding user, but because the EventBus judges receiving function only by parameter type of the event, both function will be executed. The strategy of AndroidEventBus is to add a “tag” for each event, and use parameter type and “tag” to jointly mark the uniqueness of the vent so as to ensure precise delivery.
146-
These are the differences between AndroidEventBus and EventBus of greenrobot. But it is understandable for greenrobot’s approach considering performance. And what I try to express is that there are very limited quantity of events posted in an App and the performance difference is negligible while user experience is well sensible. What I need to point out is that I know little about the ins and outs of EventsBus of greenrobot and there could be errors among what I’ve mentioned. If that happens, you are more than welcome to correct me.
146+
These are the differences between AndroidEventBus and EventBus of greenrobot. But it is understandable for greenrobot’s approach considering performance. And what I try to express is that there are very limited quantity of events posted in an App and the performance difference is negligible while user experience is well sensible. What I need to point out is that I know little about the ins and outs of EventsBus of greenrobot and there could be errors among what I’ve mentioned. If that happens, you are more than welcome to correct me.
147+
148+
### Comparison Of Characteristics
149+
150+
| library | Whether the subscription function can be executed on other thread | features |
151+
|---------------------|-----------------------|
152+
| [greenrobot's EventBus](https://github.com/greenrobot/EventBus) | yes | It adopts name pattern which is efficient but inconvenient to use. |
153+
| [square's otto](https://github.com/square/otto) | no | It is convenient to use annotation but it’s not as efficient as EventBus|
154+
| [AndroidEventBus]() | yes | It is convenient to use annotation but it’s not as efficient as EventBus. The subscription supports tag (like the Action in Broadcast Receiver) which can make event delivery more accurate and applicable to more usage scenarios. |
147155
## Thanks Note
148156
I really appreciate E-pal “淡蓝色的星期三” for his proposing of bugs and feedback and I hope more and more friends will join our team of AndroidEventBus Development.
149157

0 commit comments

Comments
 (0)