Skip to content

Refactor subscription engine#848

Draft
DavidBadura wants to merge 1 commit into4.0.xfrom
refactor-subscription-engine
Draft

Refactor subscription engine#848
DavidBadura wants to merge 1 commit into4.0.xfrom
refactor-subscription-engine

Conversation

@DavidBadura
Copy link
Copy Markdown
Member

@DavidBadura DavidBadura commented Apr 26, 2026

No description provided.

@DavidBadura DavidBadura added this to the 4.0.0 milestone Apr 26, 2026
@DavidBadura DavidBadura changed the base branch from 3.20.x to 4.0.x April 26, 2026 09:07
use Patchlevel\EventSourcing\Subscription\Subscription;
use Psr\Log\LoggerInterface;

final class LegacyWrapperSubscriptionEngine implements SubscriptionEngine, CanRefreshSubscriptions
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exists only to verify that I haven't broken the internal logic and to allow me to run it against the old tests. Once the tests pass, it will be removed and the tests split up.

@DavidBadura DavidBadura force-pushed the refactor-subscription-engine branch from 3929aca to c7f4ba6 Compare April 26, 2026 09:54
@github-actions
Copy link
Copy Markdown

Hello 👋

here is the most recent benchmark result:

SimpleSetupTaggableStoreBench
=============================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.148ms (±0.00%)   | 1.233ms (±0.00%)   | -6.87%    | 36.306mb        | 36.823mb   | -1.41%      |
| benchLoad10000Events ()                | 76.911ms (±0.00%)  | 77.098ms (±0.00%)  | -0.24%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchSave1Event ()                     | 1.411ms (±0.00%)   | 1.372ms (±0.00%)   | +2.89%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchSave10000Events ()                | 321.419ms (±0.00%) | 328.596ms (±0.00%) | -2.18%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchSave10000Aggregates ()            | 9.014s (±0.00%)    | 9.026s (±0.00%)    | -0.13%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 5.721s (±0.00%)    | 5.678s (±0.00%)    | +0.75%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchAppend1Event ()                   | 1.606ms (±0.00%)   | 1.633ms (±0.00%)   | -1.70%    | 36.306mb        | 36.306mb   | 0.00%       |
| benchAppend100Events ()                | 7.956ms (±0.00%)   | 7.728ms (±0.00%)   | +2.95%    | 36.306mb        | 36.306mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SnapshotsBench
==============

+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                   | memory                                     |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 73.074ms (±0.00%) | 73.154ms (±0.00%) | -0.11%    | 35.210mb        | 35.210mb   | 0.00%       |
| benchLoad10000Events ()                | 1.373ms (±0.00%)  | 1.384ms (±0.00%)  | -0.85%    | 35.210mb        | 35.210mb   | 0.00%       |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

CommandToQueryBench
===================

+----------------+------------------+------------------+-----------+-----------------+------------+-------------+
|                | time (kde mode)                                 | memory                                     |
+----------------+------------------+------------------+-----------+-----------------+------------+-------------+
| subject        | Tag: <current>   | Tag: base        | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------+------------------+------------------+-----------+-----------------+------------+-------------+
| benchCreate () | 2.571ms (±0.00%) | 2.663ms (±0.00%) | -3.46%    | 4.727mb         | 4.727mb    | 0.00%       |
| benchUpdate () | 4.495ms (±0.00%) | 4.346ms (±0.00%) | +3.42%    | 5.126mb         | 4.913mb    | +4.33%      |
| benchBoth ()   | 6.756ms (±0.00%) | 6.855ms (±0.00%) | -1.45%    | 5.121mb         | 5.121mb    | 0.00%       |
+----------------+------------------+------------------+-----------+-----------------+------------+-------------+

SplitStreamBench
================

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 3.595ms (±0.00%)   | 3.660ms (±0.00%)   | -1.77%    | 35.833mb        | 35.833mb   | 0.00%       |
| benchSave10000Events () | 513.480ms (±0.00%) | 514.211ms (±0.00%) | -0.14%    | 35.903mb        | 35.903mb   | 0.00%       |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBench
=======================

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.456s (±0.00%) | 3.464s (±0.00%) | -0.23%    | 48.293mb        | 48.293mb   | 0.00%       |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

SimpleSetupStreamStoreBench
===========================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.221ms (±0.00%)   | 1.203ms (±0.00%)   | +1.51%    | 35.140mb        | 35.140mb   | 0.00%       |
| benchLoad10000Events ()                | 74.156ms (±0.00%)  | 73.650ms (±0.00%)  | +0.69%    | 35.140mb        | 35.140mb   | 0.00%       |
| benchSave1Event ()                     | 1.477ms (±0.00%)   | 1.369ms (±0.00%)   | +7.87%    | 35.140mb        | 35.140mb   | 0.00%       |
| benchSave10000Events ()                | 293.310ms (±0.00%) | 295.584ms (±0.00%) | -0.77%    | 35.140mb        | 35.140mb   | 0.00%       |
| benchSave10000Aggregates ()            | 9.001s (±0.00%)    | 8.943s (±0.00%)    | +0.65%    | 35.140mb        | 35.140mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 5.661s (±0.00%)    | 5.662s (±0.00%)    | -0.02%    | 35.140mb        | 35.140mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBatchBench
============================

+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                                   | memory                                     |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 93.843ms (±0.00%) | 94.530ms (±0.00%) | -0.73%    | 35.720mb        | 35.720mb   | 0.00%       |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

PersonalDataBench
=================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.216ms (±0.00%)   | 1.209ms (±0.00%)   | +0.55%    | 35.804mb        | 35.804mb   | 0.00%       |
| benchLoad10000Events ()                | 109.565ms (±0.00%) | 113.890ms (±0.00%) | -3.80%    | 35.804mb        | 35.804mb   | 0.00%       |
| benchSave1Event ()                     | 2.346ms (±0.00%)   | 2.035ms (±0.00%)   | +15.28%   | 35.804mb        | 35.804mb   | 0.00%       |
| benchSave10000Events ()                | 328.223ms (±0.00%) | 320.851ms (±0.00%) | +2.30%    | 35.806mb        | 35.806mb   | 0.00%       |
| benchSave10000Aggregates ()            | 13.750s (±0.00%)   | 13.693s (±0.00%)   | +0.42%    | 35.804mb        | 35.804mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 10.323s (±0.00%)   | 10.272s (±0.00%)   | +0.49%    | 36.044mb        | 36.044mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant