A big benefit of cqrs is to be able to replay events during development and debugging.
Currently in my application a replay of 90k events takes 5 mins. Besides optimizing the Readmodel for performance, what would you do to make replay faster? I already tried the async cluster but on my 8-core machine there was no improvement
I use the MongoDB Eventstore,
But do you tell me that you replay events only on your dedicated mysql server? or that you have an optimized config for mysql?
The xml deserialiser, can I tun em somehow?
the XStream serializer can be tuned a bit, but don’t expect to much improvement in the area of performance. By default, it uses the XML Pull Parser, which is reasonably good.
Something you might do t improve performance is keep your DBObjects in memory as long as possible. That allows you to remove much of the I/O towards MongoDB. Of course, that’s only possible if your event handlers don’t do update queries.
Did you try profiling? That should pinpoint the #1 performance issue.
Btw: Profiling shows that the “last modified” date that I update for each event of an aggregate is consuming 20% of the overall replay time. This indicates that on the other hand the read side has no big computational bottleneck, its really mongo that’s slow.