mirror of https://github.com/zulip/zulip.git
9406bfbc0a
Fixes #29632. The issue description explains this well: We currently recalculate `currently_used_upload_space_bytes` every file upload, by dint of calling `flush_used_upload_space_cache` on save/delete, and then immediately calling `user_profile.realm.currently_used_upload_space_bytes()` in `notify_attachment_update`. Since this walks the Attachments table, recalculating this can take seconds in large realms. Switch this to using a CountStat, so we don't need to walk significant chunks of the Attachment table when we upload an attachment. This will also give us a historical daily graph of usage. |
||
---|---|---|
.. | ||
__init__.py | ||
alert_words.py | ||
bots.py | ||
clients.py | ||
constants.py | ||
custom_profile_fields.py | ||
drafts.py | ||
groups.py | ||
linkifiers.py | ||
lookups.py | ||
messages.py | ||
muted_users.py | ||
onboarding_steps.py | ||
prereg_users.py | ||
presence.py | ||
push_notifications.py | ||
realm_audit_logs.py | ||
realm_emoji.py | ||
realm_playgrounds.py | ||
realms.py | ||
recipients.py | ||
scheduled_jobs.py | ||
streams.py | ||
user_activity.py | ||
user_topics.py | ||
users.py |