-
Notifications
You must be signed in to change notification settings - Fork 0
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
Export from cart feature: what if the cart contains thousands of works? Optimize. #2660
Comments
First step, test with varying numbers of works and determine roughly how long it takes to export (on staging or production) for X=so many works. It's also somewhat possible it could be speeded up (streaming the CSV as you create it is hypothetically something that can be done with rails), not sure if this is worthwhile avenue. |
It turns out exporting lots of works to a CSV is pretty fast.
This results in a 5.6 MB file that downloads in roughly 8.5 seconds. |
Just for us to have a sense of what's going on, can you please look at how long, on staging, the action actually takes for the Rails app to return a response? That should be in logs. It shouldn't be more than the 8.5 seconds but could be a lot less, which would be good -- the rails worker may no longer be busy once it's handed off the data, it shouldn't be waiting on the network speed of the client. So 8.5 seconds really is kind of too long to hold up a Puma worker. But I guess if we think this prob won't happen that much anyway, and it's unlikely more than one staff person would be doing it at once, I guess we'll just take the risk? |
A little under 8 seconds, yeah. |
Right now it's too hard to ADD thousands of works to cart so this probably won't come up much. WHEN we make that possible, we might want to revisit this. See #2659 |
Once in a while, we're going to want to export thousands of items from the cart, so we want it to work well.
We may need to spawn a job and show a progress bar (see e.g. the UI in the downloads controller.)
The text was updated successfully, but these errors were encountered: