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

CSVReader fails with files bigger than 10 MB when constructed with std::ifstream #202

Closed
lamorlette-cintoo opened this issue Jun 13, 2022 · 2 comments

Comments

@lamorlette-cintoo
Copy link

I used to construct CVSReader with a std::ifstream as follows:

const std::filesystem::path file_path {"foo"};
std::ifstream input(file_path , std::ios::binary | std::ios::in);
csv::CSVReader path_reader {input};

It is working perfectly fine with relatively small files, but it throws an exception with files bigger than 10 MB.

I found out that the same files work perfectly fine when using the other CVSReader constructor, taking the filename as parameter:

const std::filesystem::path file_path {"foo"};
csv::CSVReader path_reader {file_path.string()};

(Unfortunately I can't share with you an example because I don't own them.)

@sjoubert
Copy link

Duplicate of #180

@vincentlaucsb
Copy link
Owner

Closing as duplicate of #180. While this is an issue, I am curious as to why people are simply not using the default memory-mapped CSVReader as recommended in the README.

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

No branches or pull requests

3 participants