vincentlaucsb / csv-parser

A high-performance, fully-featured CSV parser and serializer for modern C++.
MIT License
864 stars 144 forks source link

csv single_header slow to read data.. #219

Closed dangdkhanh closed 4 months ago

dangdkhanh commented 5 months ago

CSVReader reader("100k rows.csv");

for (CSVRow& row: reader) { // Input iterator
    for (CSVField& field: row) {
        auto k= field.get<std::string>();
      ...
    }
}

I tested with this file. However it takes 10s to read entire rows. Please check? Link

DylanBT928 commented 5 months ago

The link you provided requires access. Could you change the sharing permissions to anyone with link?

dangdkhanh commented 5 months ago

Hi @DylanBT928 , Sorry. After further investigation, my internal calls were the cause. Now the code is working fine.

dangdkhanh commented 5 months ago

Hi @DylanBT928 , I tried another csv sample and it seems to have the problem. I have updated csv link. Thanks you!