forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
registerForEvents: Start sending
user_avatar_url_field_optional
.
See the point on `user_avatar_url_field_optional` at https://zulipchat.com/api/register-queue. This will reduce the volume of data that will have to be sent in the `/register` response, which should speed up the initial load. Now, the server may choose, at its own discretion, to omit the `avatar_url` field for users in the `/register` response [1], and we'll handle it by using the `/avatar/{user_id}` endpoint. Some of the boilerplate in the new FallbackAvatarURL class is due to a performance optimization [2] based on an observed ~1s added to the rehydrate time on CZO when URL objects are constructed, vs. about 200ms (and maybe a bit more in the upper tail) when they aren't. During rehydration, we don't need to expensively construct URL objects to validate raw URL strings, as long as we do so at the edge when we receive them from the network. [1] As of the introduction of the client capability (Zulip 3.0, feature level 18), it makes this decision based on whether the user has been inactive for a long time (using the `long_term_idle` field), but this is an implementation detail and should be expected to change without notice. [2] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/user_avatar_url_field_optional/near/993660 Fixes: zulip#4157
- Loading branch information
1 parent
52a88fa
commit 7b7b63a
Showing
8 changed files
with
155 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters