Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Mytherin
Copy link
Collaborator

Fixes #18139

The performance variation comes from us triggering a poor case in MacOS' allocator - the issue doesn't occur outside of MacOS and requires a specific number of threads. We can avoid the issue (and it is generally good practice anyway) by doing fewer (re)-allocations.

This was already partially fixed once before in #18174 but that seems to have gotten lost in the refactor of #17692. This PR brings back that fix and adds an additional fix by reducing the number of CSVWriterState that are instantiated during batch writes.

@Mytherin Mytherin merged commit dff9856 into duckdb:v1.4-andium Oct 15, 2025
51 checks passed
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Oct 21, 2025
Fix duckdb/duckdb#18139: correctly initialize flush size in MemoryStream, and re-use writer states (duckdb/duckdb#19398)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Oct 21, 2025
Fix duckdb/duckdb#18139: correctly initialize flush size in MemoryStream, and re-use writer states (duckdb/duckdb#19398)

Co-authored-by: krlmlr <[email protected]>
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.

1 participant