Skip to content

Conversation

@jasonmedeiros
Copy link

Otherwise, things like CSV.init(string: String, delimiter: Character = comma, loadColumns: Bool = true) will parse the whole string when just trying to get the headers.

For large inputs, this was noticeable wasted work.

I think this was an oversight, but it does break the test testThrowsOnInvalidData. I think that test is of dubious value and just kinda incidentally worked.

Otherwise, things like CSV.init(string: String, delimiter: Character = comma, loadColumns: Bool = true) will parse the whole string when just trying to get the headers.

I think this was an oversight, but it does break the test `testThrowsOnInvalidData`. I think that test is of dubious value and just kinda incidentally worked.
@DivineDominion
Copy link
Contributor

DivineDominion commented Nov 22, 2021

Thanks for bringing this up. Implemented a fix with tests for the Parser.


We've invited you to join the SwiftCSV GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines.

DivineDominion added a commit that referenced this pull request Nov 22, 2021
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.

3 participants