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

Preallocate result list capacity when serializing #444

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

Arithmomaniac
Copy link
Contributor

The size of every row group is known from the metadata as soon as the reader is initialized. This can be used when creating the buffer list to prevent the need to optimize the list capacity (which involves creating and copying new array, and making sure the array is no larger than will be required.)

(You can't actually [currently] create a list with a capacity greater than int.MaxValue, but I wanted to delegate that exception to runtime as if this optimization was never made instead of throwing pre-emptively.)

@Arithmomaniac Arithmomaniac changed the title Preallocate list capacity when serializing (to prevent later resizing) Preallocate result list capacity when serializing Dec 28, 2023
@aloneguid aloneguid added this to the 4.19.0 milestone Jan 2, 2024
@aloneguid aloneguid merged commit 643307d into aloneguid:master Jan 5, 2024
5 checks passed
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