-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Read action takes too long on a large csv #6
Comments
What is a very long time? I'm on a pretty overpowered machine, but a file w/ 20k records just returned for me in .25s. With that said, I'll make some improvements to how our reading logic works to make it leverage the streaming nature of the file read. |
After I wrote that I realized that .25s is pretty crazy long time for this to take :) I was just thinking when you said "very long time" that it would be much longer. I'm pushing something to |
Will be looking more into this, as it highlights a few places worth optimizing. I also want to see how much of the slow down is coming from the csv parser vs Ash, but I'd venture a guess that it's mostly loading and validating stored types into memory taking the most time. |
I've pushed some non trivial performance improvements up. Give |
More than a minute I'm afraid. I can share the csv and resource for you to try out. |
Let me try the main branch and report back. Also does ash_csv work with ash_json_api? I got some error while trying to read the resource via an api endpoint |
No reason it shouldn't. What's the error? |
I have a csv of about 25000 records and a resource that uses this csv. Using
Api.read
takes a very long time even when reading only the first 5 records.The text was updated successfully, but these errors were encountered: