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

add has header and add only header if used #562

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

DavidBadura
Copy link
Member

@DavidBadura DavidBadura commented Apr 3, 2024

Currently StreamStart and Archived header have always been added, which I think is unnecessary. We should only add headers if they also have a value or are "active".

I also added a hasHeader to make the API nicer.

Furthermore, I made the message translators more general for headers.

And last but not least, performance has been improved by around 15-20%.

@DavidBadura DavidBadura added the enhancement New feature or request label Apr 3, 2024
@DavidBadura DavidBadura added this to the 3.0.0 milestone Apr 3, 2024
@DavidBadura DavidBadura requested a review from DanielBadura April 3, 2024 11:50
Copy link

github-actions bot commented Apr 3, 2024

Hello 👋

here is the most recent benchmark result:

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

+---------------------------+-----------------+-----------------+-----------------+------------+
|                           | time (kde mode)                   | memory                       |
+---------------------------+-----------------+-----------------+-----------------+------------+
| subject                   | Tag: <current>  | Tag: base       | Tag: <current>  | Tag: base  |
+---------------------------+-----------------+-----------------+-----------------+------------+
| benchHandle10000Events () | 3.236s (±0.00%) | 3.293s (±0.00%) | 37.777mb        | 37.783mb   |
+---------------------------+-----------------+-----------------+-----------------+------------+

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

+----------------------------------------+--------------------+--------------------+-----------------+------------+
|                                        | time (kde mode)                         | memory                       |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| subject                                | Tag: <current>     | Tag: base          | Tag: <current>  | Tag: base  |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| benchLoad10000Events ()                | 205.003ms (±0.00%) | 242.664ms (±0.00%) | 39.991mb        | 39.998mb   |
| benchSave1Event ()                     | 1.314ms (±0.00%)   | 1.383ms (±0.00%)   | 39.991mb        | 39.998mb   |
| benchSave10000Events ()                | 438.184ms (±0.00%) | 480.446ms (±0.00%) | 39.994mb        | 40.000mb   |
| benchSave10000Aggregates ()            | 13.349s (±0.00%)   | 13.727s (±0.00%)   | 39.991mb        | 39.998mb   |
| benchSave10000AggregatesTransaction () | 11.679s (±0.00%)   | 11.719s (±0.00%)   | 40.493mb        | 40.499mb   |
+----------------------------------------+--------------------+--------------------+-----------------+------------+

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

+-------------------------+--------------------+--------------------+-----------------+------------+
|                         | time (kde mode)                         | memory                       |
+-------------------------+--------------------+--------------------+-----------------+------------+
| subject                 | Tag: <current>     | Tag: base          | Tag: <current>  | Tag: base  |
+-------------------------+--------------------+--------------------+-----------------+------------+
| benchLoad10000Events () | 5.120ms (±0.00%)   | 5.670ms (±0.00%)   | 40.666mb        | 41.234mb   |
| benchSave10000Events () | 541.246ms (±0.00%) | 586.056ms (±0.00%) | 40.677mb        | 41.246mb   |
+-------------------------+--------------------+--------------------+-----------------+------------+

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

+----------------------------------------+--------------------+--------------------+-----------------+------------+
|                                        | time (kde mode)                         | memory                       |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| subject                                | Tag: <current>     | Tag: base          | Tag: <current>  | Tag: base  |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| benchLoad10000Events ()                | 126.297ms (±0.00%) | 163.171ms (±0.00%) | 37.338mb        | 37.343mb   |
| benchSave1Event ()                     | 867.600μs (±0.00%) | 898.800μs (±0.00%) | 37.338mb        | 37.343mb   |
| benchSave10000Events ()                | 369.182ms (±0.00%) | 409.329ms (±0.00%) | 37.338mb        | 37.344mb   |
| benchSave10000Aggregates ()            | 9.719s (±0.00%)    | 8.996s (±0.00%)    | 37.338mb        | 37.343mb   |
| benchSave10000AggregatesTransaction () | 7.333s (±0.00%)    | 7.495s (±0.00%)    | 37.338mb        | 37.343mb   |
+----------------------------------------+--------------------+--------------------+-----------------+------------+

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

+----------------------------------------+--------------------+--------------------+-----------------+------------+
|                                        | time (kde mode)                         | memory                       |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| subject                                | Tag: <current>     | Tag: base          | Tag: <current>  | Tag: base  |
+----------------------------------------+--------------------+--------------------+-----------------+------------+
| benchLoad10000EventsMissingSnapshot () | 128.106ms (±0.00%) | 163.112ms (±0.00%) | 37.356mb        | 37.362mb   |
| benchLoad10000Events ()                | 633.800μs (±0.00%) | 513.100μs (±0.00%) | 37.356mb        | 37.362mb   |
+----------------------------------------+--------------------+--------------------+-----------------+------------+

This comment gets update everytime a new commit comes in!

@DavidBadura DavidBadura merged commit e21a37f into 3.0.x Apr 3, 2024
35 of 36 checks passed
@DavidBadura DavidBadura deleted the add-has-header branch April 3, 2024 13:07
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