hirethunk / verbs

Verbs is an event sourcing package for PHP artisans
https://verbs.thunk.dev
MIT License
412 stars 32 forks source link

Optimize the number of queries executed for reading state_events #154

Closed rzv-me closed 1 month ago

rzv-me commented 2 months ago

When reading state_events, the queries are executed twice.

Reason is very simple, with lazy collections, not everything happens lazely, each being one of those methods.

Fixed this and now the numbers of queries is halfed.