bulk_get_subscriber_user_ids: Sort each user list by ID.

This simple backwards-compatible change saves approximately 12% in the
compressed size of the chat.zulip.org page_params.  We can do much,
much better by changing the format, but this seems like a good
intermediate step.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-09-19 16:15:00 -07:00
committed by Tim Abbott
parent 2e1494bdbd
commit cf5a00d94b

View File

@@ -2627,7 +2627,8 @@ def bulk_get_subscriber_user_ids(stream_dicts: Iterable[Mapping[str, Any]],
zerver_subscription.active AND
zerver_userprofile.is_active
ORDER BY
zerver_subscription.recipient_id
zerver_subscription.recipient_id,
zerver_subscription.user_profile_id
''' % (id_list,)
cursor = connection.cursor()