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

[PERF] Remove upfront buffer allocations for local CSV reader #3242

Conversation

desmondcheongzx
Copy link
Contributor

The local CSV reader currently makes upfront buffer allocations (80 MiB for file slabs and 80 MiB for CSV buffers). This unnecessarily blows up the read time for small CSV files which don't use so many buffers.

Since the local CSV reader allocates additional buffers as needed, we can remove all upfront allocations without affecting anything else in the implementation of the reader. This speeds up reads of small files.

At the same time, I benchmarked the performance of the reader against the test case described in #3055 and found no consistent slowdown without upfront comparisons.

Copy link

codspeed-hq bot commented Nov 7, 2024

CodSpeed Performance Report

Merging #3242 will not alter performance

Comparing desmondcheongzx:remove-upfront-csv-buffer-allocations (25cb584) with main (baca61e)

Summary

✅ 17 untouched benchmarks

@desmondcheongzx desmondcheongzx merged commit 2b71ffb into Eventual-Inc:main Nov 7, 2024
38 checks passed
@desmondcheongzx desmondcheongzx deleted the remove-upfront-csv-buffer-allocations branch November 7, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants