mirror of https://github.com/zulip/zulip.git
b742f1241f
The active realm emoji are just a subset of all your realm emoji, so just use a single cache entry per realm. Cache misses should be very infrequent per realm. If a realm has lots of deactivated realm emoji, then there's a minor expense to deserialize them, but that is gonna be dwarfed by all the other more expensive operations in message-send. I also renamed the two related functions. I erred on the side of using somewhat verbose names, as we don't want folks to confuse the two use cases. Fortunately there are somewhat natural affordances to use one or the other, and mypy helps too. Finally, I use realm_id instead of realm in places where we don't need the full Realm object. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
openapi | ||
tests | ||
tornado | ||
transaction_tests | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |