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

IntoRow implementations for more than 4 columns leads to array reallocations #369

Open
aurelien-riv opened this issue Dec 7, 2024 · 0 comments · May be fixed by #370
Open

IntoRow implementations for more than 4 columns leads to array reallocations #369

aurelien-riv opened this issue Dec 7, 2024 · 0 comments · May be fixed by #370

Comments

@aurelien-riv
Copy link

I am inserting close to 2 million rows into three different tables using bulk load. One of them represents 1.2 million rows with 7 columns.
I had a look to heaptrack's collected data, and it appears that into_rows produces many Vec grows :

image

Indeed, the helper functions all use ::new instead of ::new_with_capacity. If I initialize them with the correct size, TokenRow::push is no longer present in the report and the allocation count decreases.

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 a pull request may close this issue.

1 participant