-
Notifications
You must be signed in to change notification settings - Fork 125
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
Value based offset #750
Value based offset #750
Conversation
* add tests for it * make it's initializer signature simpler and more consistent with existing RubyEventStore::BatchEnumerator
100% coverage for RailsEventStoreActiveRecord::EventRepositoryReader#read
@porbas could you make some benchmark of speed improvements? You could base the benchmark code on https://github.com/mlomnicki/res-benchmarks - with my changes in mlomnicki/res-benchmarks#1 - but you will need to adjust the read code to make sure you check reading in batches on a large set of domain events. |
Yes, I've already started working on benchmarks but it is not easy to set up. Thanks for links. I hope it will be easier now! |
You could also use https://github.com/RailsEventStore/rails_event_store/tree/master/contrib/measure to build your benchmark code. |
Benchmark prepared https://github.com/porbas/res-benchmarks and executed for 200_000 events (PostgreSQL 12):
it took about 20minutes to complete. Now I'm going to run benchmark for 600_000 events |
Benchmarks for 600_000 events took about 75 minutes. Now difference is about 2x:
|
This is just friendly reminder 😃 |
Good base to improve upon, thanks! |
…ranteed When monotonicity cannot be guaranteed, use RubyEventStore::BatchEnumerator operating on offset + limit. That has some performance penalty of OFFSET + LIMIT in databases engines on large data sets. Probably something to ignore on smaller streams — correctness comes first. #750 (comment) #1037 #810 (comment)
…ranteed When monotonicity cannot be guaranteed, use RubyEventStore::BatchEnumerator operating on offset + limit. That has some performance penalty of OFFSET + LIMIT in databases engines on large data sets. Probably something to ignore on smaller streams — correctness comes first. #750 (comment) #1037 #810 (comment)
Hi @mpraglowski
I've closed #746 as it was really messed up with commits, merges and rebases. Here is clean commits history.