zulip/zerver
Steve Howell 8ad7133351 Cache active_user_ids() more directly.
We now have a dedicated cache for active_user_ids() that only
stores a list of user_ids.

Before this commit, active_user_ids() used a cache of UserProfile
dictionaries, so it incurred unnecessary deserialization costs for
all the user fields that it sliced away in a list comprehension.

Because the cache is skinnier here, we also need to invalidate it
less frequently.  Basically, all we care about is new users, realm
deactivations, and user deactivations.

It's hard to measure how much this will improve performance, because
the speedup for any operation here is pretty minor, but we use this
function a lot, so hopefully it will make the overall system more
healthy.
2017-09-20 10:31:33 -07:00
..
fixtures tests: Replace test_user_agent_parsing with a normal test. 2017-09-16 03:56:18 -07:00
lib Cache active_user_ids() more directly. 2017-09-20 10:31:33 -07:00
management i18n: Optimize get_language_list(). 2017-09-14 02:28:58 -07:00
migrations Make migration 0032 use an old version of user_avatar_path. 2017-09-16 03:27:02 -07:00
templatetags templatetags: Fix buggy exception clause. 2017-08-25 00:39:58 -07:00
tests Cache active_user_ids() more directly. 2017-09-20 10:31:33 -07:00
tornado event_queue: Make path forward for push/email notifications clearer. 2017-09-15 01:01:11 -07:00
views Only require realm_id for get_active_user_dicts_in_realm(). 2017-09-20 10:31:33 -07:00
webhooks webhooks/trello: Ignore when Board background is changed. 2017-09-15 01:02:47 -07:00
worker Use user_ids, not full objects, in render path. 2017-09-12 04:22:55 -07:00
__init__.py
apps.py Add notifications on new logins to Zulip. 2017-03-25 16:50:52 -07:00
context_processors.py login: Enable non-email username to login. 2017-09-15 10:30:19 -07:00
decorator.py logger: Add new create_logger abstraction to simplify logging. 2017-08-27 18:31:53 -07:00
filters.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
forms.py forms: Replace is_inactive with more comprehensive check. 2017-08-24 23:16:31 -07:00
logging_handlers.py logging_handlers: Fix tracebacks being emailed in subject lines. 2017-04-25 18:55:11 -07:00
middleware.py mypy: Correct 2 type annotations in zerver/middleware.py. 2017-08-15 17:50:18 -07:00
models.py Cache active_user_ids() more directly. 2017-09-20 10:31:33 -07:00
signals.py Update "MacOS" text to "macOS" 2017-08-26 09:00:42 -07:00
static_header.txt
storage.py mypy: Remove type: ignores not needed in Python 3. 2017-08-25 11:04:20 -07:00