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

Reduce memory usage of min and max aggregators #2123

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Reduce memory usage of min and max aggregators #2123

merged 1 commit into from
Oct 18, 2023

Conversation

Jesse-Bakker
Copy link
Contributor

This makes use of the fact that the output value of the aggregator will
always be of the same, predetermined type. Therefore, there is no use in
storing the type of the output for every record in the state.

Field is 32 bytes, whereas the most common types for the outputs (u64
and float) are 8 bytes. In those cases this changes saves about 3/4 of
the memory.

MinValue and MaxValue require some more work, and are therefore not included
in this PR, but the same principle applies there.

This makes use of the fact that the output value of the aggregator will
always be of the same, predetermined type. Therefore, there is no use in
storing the type of the output for every record in the state.

`Field` is 32 bytes, whereas the most common types for the outputs (u64
and float) are 8 bytes. In those cases this changes saves about 3/4 of
the memory.
@Jesse-Bakker Jesse-Bakker requested a review from snork-alt October 4, 2023 15:22
@chubei chubei added this pull request to the merge queue Oct 18, 2023
Merged via the queue into getdozer:main with commit 31787bd Oct 18, 2023
6 checks passed
@chubei chubei deleted the feat/minmax-memory branch October 18, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants