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

Compare Flow with Disruptor #6

Closed
dansiviter opened this issue Mar 6, 2021 · 1 comment
Closed

Compare Flow with Disruptor #6

dansiviter opened this issue Mar 6, 2021 · 1 comment

Comments

@dansiviter
Copy link
Owner

dansiviter commented Mar 6, 2021

Compare if the 90KB+ dependency of com.lmax:disruptor is worth it over Flow.

dansiviter added a commit that referenced this issue Mar 6, 2021
dansiviter added a commit that referenced this issue Mar 7, 2021
@dansiviter
Copy link
Owner Author

dansiviter commented Mar 7, 2021

Performance isn't what I expected out of the box, Disruptor is roughly the same as Flow:

Benchmark                                                              (handlerName)   Mode  Cnt      Score       Error  Units
ConsoleHandlerBenchmark.handler                                 j.u.l.ConsoleHandler  thrpt   25  25365.926 ±  2550.259  ops/s
ConsoleHandlerBenchmark.handler:Used memory heap                j.u.l.ConsoleHandler  thrpt   25  44632.638 ±  8489.078     KB
ConsoleHandlerBenchmark.handler                            u.d.l.AsyncConsoleHandler  thrpt   25  74252.157 ±  5302.526  ops/s
ConsoleHandlerBenchmark.handler:Used memory heap           u.d.l.AsyncConsoleHandler  thrpt   25  34605.517 ± 14178.321     KB
ConsoleHandlerBenchmark.handler                   u.d.l.DisruptorAsyncConsoleHandler  thrpt   25  73753.890 ±  6732.131  ops/s
ConsoleHandlerBenchmark.handler:Used memory heap  u.d.l.DisruptorAsyncConsoleHandler  thrpt   25  34410.716 ± 14086.516     KB

Therefore the library size penalty isn't worth it. Disruptor may be configured to out perform but that goes against the ethos of lean and light.

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

1 participant