Open timabbott opened 7 years ago
update: We now have avatar_source
and avatar_version
in active_user_dict_fields
.
Cool, converted to checkboxes and added that :)
Was going to open an issue for this. Realized that this should be done while working on PR #3597. Will start working on this after completing some of the remaining issues on my TODO.
The active_user_dict_fields
object is now called realm_user_dict_fields, and we've completed most of this. It probably would not be a ton of work to finish this.
Currently,
page_params
sends down therealm_users
data structure, which in turn is sourced fromzerver/models.py:active_user_dicts_in_realm
, an efficiently cached data structure containing (1) only active users and (2) no avatar URLs or bot owners, but otherwise the same data thatGET /json/users
returns. It seems like we could make the following changes:active_user_ids
part of #3709, to minimize perf impact of adding stuff toactive_user_dicts_in_realm
.avatar_url
toactive_user_dict_fields
(we kinda need to do this anyway for being able to show avatars of other users not in the message feed, e.g. via profiles you click to from the right sidebar).bot_owner
toactive_user_dict_fields
(for bot users only, no sense blocking up the data set unnecessarily).active_user_dicts_in_realm
to includeis_active
(and inactive users; would want to rename it as well), or make a new version of the query for the/#administration
page that only fetches inactive users (and thus would be relatively efficient in most realms) when you click into the "deactivated users" tab.GET /json/users
able to read fromactive_user_dicts_in_realm
and thus the relevant cache.On chat.zulip.org, the
GET /json/users
call takes about 500ms, so this could be a significant performance win if done right.