mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
The actual database query that we use to fill the UserMessage cache only takes a few hundred milliseconds to run; however the process of iterating through the results would take 3-5 seconds because the Django ORM is not very efficient for small tables where we're only interested in the integer values in a couple columns. So we can save most of that Tornado startup time by just doing this one query manually; I left the original query next to it in a comment so it is easy to keep it all up to date as we change our product. (imported from commit ac4675bcdda5d812ebfbe211450c85ee2787ee66)
11 KiB
11 KiB