3

Both EventBus and Otto are event bus, and I found EventBus has this conclusion:

Benchmark results indicate that EventBus is significantly faster in almost every scenario:

here is origin page

My question is why EventBus is more faster than Otto. I has read the two source code, and don't found obvious difference. Here is what I found the difference:

  1. Otto use annotation process at runtime.

  2. EventBus use CopyOnWriteArrayList to store Subscription while Otto use Set.

Are there any other reasons? Is it the main reason that Otto use annotation process at runtime? Could someone explain the reason EventBus is significantly faster while it compare with otto?

Thanks in advance.

xxxzhi
  • 471
  • 3
  • 12
  • FYI: Event Bus is a pattern. Otto is event bus too. Green Robot's event bus got no dedicated name so you should consider redacting your question to make clear to what event bus you refer as `EventBus`. – Marcin Orlowski May 10 '16 at 08:01

0 Answers0