1
0
Fork 0
bookwyrm/bookwyrm/tests/views/preferences
Wesley Aptekar-Cassels 50a81bdfdd Change CSV export to buffer instead of streaming
The idea behind a streaming CSV export was to reduce the amount of
memory used, by avoiding building the entire CSV file in memory before
sending it to the client. However, it didn't work out this way in
practice: the query objects that were created to represent each line
caused Postgres to generate a very large (~200MB on bookwyrm.social)
temp file, not to mention the memory being used by the Query object
likely being similar to, if not larger than that used by the finalized
CSV row.

While we should in the long term run our CSV exports as a Celery task,
this change should allow CSV exports to work on large servers without
causing disk-space problems.

Fixes: #2157
2023-03-08 21:37:56 -05:00
..
__init__.py Updates init files for pylint 2022-04-08 14:16:05 -07:00
test_block.py Prefs mocks 2021-12-09 20:30:53 -08:00
test_change_password.py Updates tests 2022-07-15 11:18:47 -07:00
test_delete_user.py Allow users to temporarily deactivate their accounts (#2324) 2022-11-10 13:40:54 -08:00
test_edit_user.py More mocks for more tests 2021-12-09 19:14:10 -08:00
test_export.py Change CSV export to buffer instead of streaming 2023-03-08 21:37:56 -05:00
test_two_factor_auth.py add test_post_login_with_2fa 2022-10-15 07:47:20 +11:00