Skip to content
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

remove nested encoding #565

Merged
merged 1 commit into from
Apr 9, 2024
Merged

remove nested encoding #565

merged 1 commit into from
Apr 9, 2024

Conversation

DavidBadura
Copy link
Member

@DavidBadura DavidBadura commented Apr 3, 2024

I noticed that we serialize every single header as json, and at the end save the whole thing again in the db as json. We can make this more optimized by no longer serializing all individual headers as json and only in the DB.

The typehints were opened to allow other serializers. The main thing is to allow a LegacyHeadersSerializer that can process the old headers from the 2.x store.

@DavidBadura DavidBadura added this to the 3.0.0 milestone Apr 3, 2024
Copy link

github-actions bot commented Apr 3, 2024

Hello 👋

here is the most recent benchmark result:

SimpleSetupBench
================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events ()                | 52.722ms (±0.00%)  | 53.541ms (±0.00%)  | -1.53%    | 34.194mb        | 34.202mb   | -0.02%      |
| benchSave1Event ()                     | 978.000μs (±0.00%) | 1.012ms (±0.00%)   | -3.34%    | 34.194mb        | 33.692mb   | +1.49%      |
| benchSave10000Events ()                | 222.555ms (±0.00%) | 234.536ms (±0.00%) | -5.11%    | 33.692mb        | 33.692mb   | 0.00%       |
| benchSave10000Aggregates ()            | 8.695s (±0.00%)    | 8.807s (±0.00%)    | -1.27%    | 33.692mb        | 33.692mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 6.721s (±0.00%)    | 6.748s (±0.00%)    | -0.40%    | 33.692mb        | 33.692mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 54.129ms (±0.00%)  | 54.101ms (±0.00%)  | +0.05%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchLoad10000Events ()                | 824.200μs (±0.00%) | 881.500μs (±0.00%) | -6.50%    | 33.763mb        | 33.763mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 4.967ms (±0.00%)   | 5.049ms (±0.00%)   | -1.61%    | 37.070mb        | 37.070mb   | 0.00%       |
| benchSave10000Events () | 380.317ms (±0.00%) | 394.970ms (±0.00%) | -3.71%    | 37.071mb        | 37.071mb   | 0.00%       |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.014s (±0.00%) | 3.018s (±0.00%) | -0.10%    | 34.161mb        | 34.161mb   | 0.00%       |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

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

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events ()                | 86.679ms (±0.00%)  | 89.928ms (±0.00%)  | -3.61%    | 35.778mb        | 35.778mb   | 0.00%       |
| benchSave1Event ()                     | 1.569ms (±0.00%)   | 1.443ms (±0.00%)   | +8.73%    | 35.778mb        | 35.778mb   | 0.00%       |
| benchSave10000Events ()                | 253.751ms (±0.00%) | 258.857ms (±0.00%) | -1.97%    | 35.780mb        | 35.780mb   | 0.00%       |
| benchSave10000Aggregates ()            | 12.491s (±0.00%)   | 12.672s (±0.00%)   | -1.43%    | 35.778mb        | 35.778mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 10.725s (±0.00%)   | 10.742s (±0.00%)   | -0.16%    | 36.280mb        | 36.280mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

@DavidBadura DavidBadura force-pushed the remove-nested-encoding branch 2 times, most recently from 11689cc to eed227e Compare April 3, 2024 16:28
@DavidBadura DavidBadura requested a review from DanielBadura April 3, 2024 22:05
@DavidBadura DavidBadura added the enhancement New feature or request label Apr 3, 2024
@DavidBadura DavidBadura force-pushed the remove-nested-encoding branch 2 times, most recently from 757a04c to 964b37f Compare April 9, 2024 10:06
@DavidBadura DavidBadura force-pushed the remove-nested-encoding branch from 964b37f to 15aeca9 Compare April 9, 2024 10:24
@DavidBadura DavidBadura merged commit 39d04c0 into 3.0.x Apr 9, 2024
33 of 36 checks passed
@DavidBadura DavidBadura deleted the remove-nested-encoding branch April 9, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants