-
Notifications
You must be signed in to change notification settings - Fork 6
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
CSV files download should be async #2350
Comments
Let's note that the file which usually gives issues is the Interactions file (I don't remember having had issues with any other CSV file - but please correct me, @manumoreira). But it may make a lot of sense to share the same approach between different files. We could also generate the task (to create the files) and then notifiy the requester via email. |
In some cases we've seen issues with the results file in large surveys. |
* Preload channels from survey.respondent_groups * fix respondent_controller_tests * preload all respondent_groups channels in the same query
Respondent files are usually large (Interactions files can grow up to 1M rows), and the "low" limit in queries made the DB work much more than needed (we've observed 99% CPU usage in the mysqld process when generating a 1M-rows interactions file with 1000 rows per query). Increasing this limit makes the app generate less queries to the DB, effectively driving the CPU usage down to about 30% instead. There's probably more room for improvement (the generation of the file is still CPU-bound instead of network-bound), but that's on the app itself - we should profile the app's code to further improve the performance. See #2350 See #2359 Co-authored-by: Gustavo Giráldez <[email protected]>
Respondent files are usually large (Interactions files can grow up to 1M rows), and the "low" limit in queries made the DB work much more than needed (we've observed 99% CPU usage in the mysqld process when generating a 1M-rows interactions file with 1000 rows per query). Increasing this limit makes the app generate less queries to the DB, effectively driving the CPU usage down to about 30% instead. There's probably more room for improvement (the generation of the file is still CPU-bound instead of network-bound), but that's on the app itself - we should profile the app's code to further improve the performance. See #2350 See #2359 Co-authored-by: Gustavo Giráldez <[email protected]>
We should un-skip them by the end of the PR. See #2350
The info about the generated files is still pending. See #2350
This will allow us to check if there already is a file generated or not. Also, we move the decision of whether to regenerate a file or not to the user (instead of checking if we should generate the file again or not). See #2350
From the UI, request that the CSV files are generated by the backend. We still miss checking if the files exist or are currently being generated. See #2350
Small changes, nothing too relevant. See #2350
There's probably still an issue with react-timeago not being properly ignored yet. See #2350
There are no definitions available. See #2350
In the last years CSV download has been generating several problems to the users. On medium to big surveys it ends up crashing the server frequently.
A solution for this problem can be uncoupling file creation from download.
This will imply a change in the user interaction.
Initially the user will click to create the file, the creation will be processed and once it is ready the user will be see a button to download it.
We will need mockups for this
(source)
Questions:
The text was updated successfully, but these errors were encountered: