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

packer: add buf_size option #604

Merged
merged 5 commits into from
May 5, 2024
Merged

packer: add buf_size option #604

merged 5 commits into from
May 5, 2024

Conversation

methane
Copy link
Member

@methane methane commented May 5, 2024

Change the default buffer size to 256KiB.

rtobar and others added 5 commits July 18, 2023 21:17
Giving this flexibility to users means that internal reallocations can
be avoided if the buffer size is good enough, at the expense of
potentially allocating more memory than needed. This, together with
reusing a Packer object, means that multiple serialisations can end up
requiring no memory allocations other than the initial buffer creation,
which can be a big win in some situations.

The default value is still 1MB, making this backwards compatible.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@methane methane merged commit 72e65fe into main May 5, 2024
23 checks passed
@methane methane deleted the bufsize-argument branch May 5, 2024 15:49
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.

2 participants