neos / Neos.EventSourcing

A library for Event Sourcing and CQRS for Flow projects.
MIT License
44 stars 30 forks source link

Speed up catchUp() and replay() #317

Closed robertlemke closed 11 months ago

robertlemke commented 11 months ago

While catching up or replaying a projection, a transaction for the highest applied event sequence number is only closed when an event was actually applied or the catch-up-process is done. This speeds up the process dramatically for event stores containing hundreds of thousands of events.

Two examples:

1) Event store with 2.000.000 events. Only 3500 are relevant for the projection in question. Replaying the projection takes

2) Event listener lags 50.000 events behind. Only 1 new relevant event for the projection. Catching up takes

Resolves #316