zulip/zerver
Steve Howell ecbbc3e365 performance: Simplify bulk_create_users().
We were going back to the database to get all
the users in the realm, when we had them right
there already.  I believe this is a legacy
of us running on a very old version of Django
(back in early days), where `bulk_create`
didn't give you back ids in a nice way.

In the interim we added the `RealmAuditLog`
code, which does take advantage of the
existing profiles (and proves we can rely
on them).

But meanwhile we were still
doing a query to get all N users in the
realm.  With `selected_related`!

To be fair, bulk_create_users() is by
its very nature a pretty infrequent
operation.  This change is more motivated
by code cleanup.

Now we just loop through user_ids for
the Recipient/Subscriber foreign key rows.

I also removed some fairly convoluted code mapping
emails to user_ids and just work in user_id
space.
2020-03-19 16:04:05 -07:00
..
data_import emoji_codes: Replace JS module with JSON module. 2020-02-12 10:09:12 -08:00
lib performance: Simplify bulk_create_users(). 2020-03-19 16:04:05 -07:00
management refactor: Extract zerver/lib/email_validation.py. 2020-03-06 11:53:22 -08:00
migrations models: Add recipient foreign key to Huddle. 2020-03-17 05:41:11 -07:00
openapi api: Document DELETE ../messages/{message_id}/reactions endpoint. 2020-03-08 19:12:45 -07:00
templatetags openapi: Pass api_url to curl example generation. 2019-08-17 11:35:08 -07:00
tests tests: Use email/delivery_email more explicitly. 2020-03-19 16:04:03 -07:00
tornado middleware: Use request.user for logging when possible. 2020-03-09 13:54:58 -07:00
views presence api: Use email to look up presence. 2020-03-19 14:32:18 -07:00
webhooks tests: Use email/delivery_email more explicitly. 2020-03-19 16:04:03 -07:00
worker queue processors: Flush per-request caches after each item. 2020-03-03 15:29:11 -08:00
__init__.py
apps.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
context_processors.py decorators: Restructure get_client_name interface. 2020-03-08 14:19:50 -07:00
decorator.py tests: Add uuid_get and uuid_post. 2020-03-11 14:18:29 -07:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py refactor: Move validate_email_not_already_in_realm. 2020-03-06 11:53:22 -08:00
logging_handlers.py version: Only let `git describe` match tags beginning with a digit. 2019-10-24 14:54:45 -07:00
middleware.py middleware: Use request.user for logging when possible. 2020-03-09 13:54:58 -07:00
models.py presence api: Use email to look up presence. 2020-03-19 14:32:18 -07:00
signals.py emails: Translate from_name of account security emails. 2020-02-18 17:45:33 -08:00