-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
I don't know why it takes so long for this case. #911
Comments
empty lines are skipped using |
Thanks for your response @bezrodnov do you think this can be resolved differently without |
Hi @loia5tqd001 :) I'll probably open a PR to fix this issue when I am confident enough in one of these solutions (or maybe find a better one).
P.S. unfortunately the code is not written as per latest ES standards so I filtered out some solutions cause this library should work properly in different environments. E.g. I am not sure if |
Which are the requeriments of |
BTW we are using papaparser in our project and we've faced exactly the same issue on production recently. |
That sounds great, thanks for your contribution @bezrodnov , perhaps need to wait for the maintainer's judge to conclude |
@bezrodnov I will be happy to merge a PR that fixes that. As already commented I think |
@pokoli I've found out that P.S. I had some fun comparing the solutions - https://jsbench.me/r7kybtdq5b/1 And just out of curiosity I tried populating an array with 1 mil random numbers using different methods: https://jsbench.me/8ukybr9f3i/1 - the fastest solution was setting the value using an index in the array with pre-allocated size - which did not surprise me, but I just don't personally like how it looks 🙂 |
Fixed with #912 |
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:
Stream
optionSkip Empty Lines
optionChanging 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
evil_csv_file.csv
The text was updated successfully, but these errors were encountered: