zulip/zilencer
Alex Vandiver 7feda75c5f populate_db: Temporarily remove post-delete signal on AlertWord.
The post-delete signal on AlertWord clears the realm cache; when it is
called repeatedly, this results in re-fetching the realm object O(n)
times, where n scales by number of users in the database.

Disconnect this cache-clearing signal before removing the AlertWord
entries, and reconnect it afterwards.  This is not thread-safe, but
this section is single-threaded.  It is also probably unnecessary to
re-connect the signal, as rest of `./manage.py populate_db` does not
delete AlertWord objects, but cleanliness dictates doing the
re-connection.

This drops the time to repeatedly run:
    python3 ./manage.py populate_db --num-messages=0 --extra-users=1000

...from 47 seconds to 36 seconds.
2023-02-17 13:59:11 -08:00
..
lib billing: Move zilencer/lib/stripe to corporate. 2018-10-01 15:43:44 -07:00
management populate_db: Temporarily remove post-delete signal on AlertWord. 2023-02-17 13:59:11 -08:00
migrations black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
README.md docs: Format Markdown with Prettier. 2021-09-08 12:06:24 -07:00
__init__.py
auth.py ruff: Fix RSE102 Unnecessary parentheses on raised exception. 2023-02-04 16:34:55 -08:00
models.py ruff: Fix RSE102 Unnecessary parentheses on raised exception. 2023-02-04 16:34:55 -08:00
urls.py rest: Extract remote_server_path from rest_path. 2022-08-13 14:53:52 -07:00
views.py Fix typos caught by typos. 2023-01-03 11:09:50 -08:00

README.md

ZILENCER -- The Zulip license manager

This app is the place for storing state about various deployments of Zulip that exist in the world.