question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I don't know why it takes so long for this case.

See original GitHub issue

Papaparse can parse a 50MB file in about 1 second in my machine. It’s great.

However, I’m not sure what is special about this csv file but it’s just 400KB but takes 60 seconds to parse, and the whole browser was stalled meanwhile.

I’ve tried to tweak some settings and looks like the problem will only occur if:

  • We don’t enable Stream option
  • We enable the Skip Empty Lines option

Changing any of those will make it work normally again. I’m just wondering why those options affect the performance so significantly.

https://www.papaparse.com/demo

image

evil_csv_file.csv

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pokolicommented, Jan 12, 2022

@bezrodnov I will be happy to merge a PR that fixes that. As already commented I think Array.filter is the way to go if that does not break anything. Otherwise we can consider any other solution.

1reaction
bezrodnovcommented, Jan 12, 2022

BTW we are using papaparser in our project and we’ve faced exactly the same issue on production recently. And I can confirm that the code gets stuck in this “for-with-array-splice” loop - in our case the number of elements in the array was slowly decreasing from 1+ million to ~200 records (which took more than 10 minutes). And I guess MS Excel could cause the file to look that weird.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Is My Personal Injury Case Taking So Long - BBB Attorneys
Ultimately, there is no specific timeline for personal injury cases in Connecticut. The only thing you have to do is file a lawsuit...
Read more >
Why Is My Immigration Case Taking So Long? | AllLaw
If that doesn't work, or you just can't wait any longer, definitely contact an immigration lawyer. Your Immigration-Related Mail Got Sent to the...
Read more >
Why does my immigration case take so long? 5 Reasons
Certain immigration cases take longer than others...Find out if yours is an immigration case that can drag out for decades?
Read more >
Why Is My Case Taking So Long? - Avrek Law Firm
It begins with insurance companies. First and foremost is the fact that insurance companies are in no hurry to settle. The longer they...
Read more >
Why Is My Lawyer Taking So Long to ... - Brown & Crouppen
Understand the common reasons why cases can seem to take a long time from Jennifer Walsh, an attorney with Brown & Crouppen.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found