zulip/zerver
Steve Howell 7e55cab429 invite performance: Reduce queries to find existing users.
In the prep commits leading up to this, we split
out two new helpers:

    validate_email_is_valid
    get_errors_for_new_emails

Now when we validate invites we use two separate
loops to filter our emails.

Note that the two extracted functions map to two
of the data structures that used to be handled
in a single loop, and now we break them out:

    errors = validate_email_is_valid
    skipped = get_errors_for_new_emails

The first loop checks that emails are even valid
to begin with.

The second loop finds out whether emails are already
in use.

The second loop takes advantage of this helper:

    get_errors_for_new_emails

The second helper can query all potential new emails
with a single round trip to the database.

This reduces our query count.
2020-03-06 11:53:22 -08:00
..
data_import emoji_codes: Replace JS module with JSON module. 2020-02-12 10:09:12 -08:00
lib invite performance: Reduce queries to find existing users. 2020-03-06 11:53:22 -08:00
management refactor: Extract zerver/lib/email_validation.py. 2020-03-06 11:53:22 -08:00
migrations auth: Add support for GitLab authentication. 2020-02-11 13:54:17 -08:00
openapi docs: Recommend user_id instead of email in send-message doc. 2020-03-06 11:39:43 -08:00
templatetags openapi: Pass api_url to curl example generation. 2019-08-17 11:35:08 -07:00
tests invite performance: Reduce queries to find existing users. 2020-03-06 11:53:22 -08:00
tornado events: Add block for compatibility with old delete_message events. 2020-03-03 15:52:42 -08:00
views user settings: Inline call to validate_email. 2020-03-06 11:53:22 -08:00
webhooks integrations: Improved Taiga Integration. 2020-03-04 16:52:52 -08: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 login: Make authentication_methods data available to JavaScript. 2020-02-02 20:22:49 -08:00
decorator.py tornado: Rewrite Django integration to duplicate less code. 2020-02-13 16:13:11 -08:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py refactor: Extract zerver/lib/email_validation.py. 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: Avoid running APPEND_SLASH logic in Tornado. 2020-02-14 16:15:57 -08:00
models.py performance: Add get_users_by_delivery_email(). 2020-03-06 11:53:22 -08:00
signals.py emails: Translate from_name of account security emails. 2020-02-18 17:45:33 -08:00