mirror of https://github.com/zulip/zulip.git
typing notifications: Increase various time constants.
See https://chat.zulip.org/#narrow/stream/6-frontend/topic/typing.20notifications.20efficiency/near/1664991. As detailed in that discussion, `TYPING_STARTED_EXPIRY_PERIOD_MILLISECONDS` and `TYPING_STARTED_WAIT_PERIOD_MILLISECONDS` are coupled constants, and the impact of them being large is mainly that if a user closes their computer or loses network in the middle of typing something (not exactly a common occasion), then the client will suggest they kept on typing longer than they in fact did. There's a substantial decrease in resources consumed by this feature associated with raising `TYPING_STARTED_WAIT_PERIOD_MILLISECONDS`, so that at least seems worth doing. Meanwhile, because TYPING_STOPPED_WAIT_PERIOD_MILLISECONDS measures how long we should wait before deciding to stop suggesting a user is still typing if they were previously typing a message but paused doing so without closing the compose box (example causes being stepping away from the computer, tabbing to go look something up, or just thinking for a bit). On the one hand, even the original 5 seconds is a fairly long time to pause to think without touching the keyboard; on the other hand, sitting with text you've written in the compose box is likely still a quite high intent-to-send-soon state. Increasing this to 12 seconds seems like a reasonable balance between being too trigger-happy here here and avoiding someone who left their computer appearing like they are still typing for a long time afterwards.
This commit is contained in:
parent
72aa4b256d
commit
22d59f1132
|
@ -592,15 +592,15 @@ MAX_DRAFTS_IN_REGISTER_RESPONSE = 1000
|
|||
# How long before a client should assume that another client sending
|
||||
# typing notifications has gone away and expire the active typing
|
||||
# indicator.
|
||||
TYPING_STARTED_EXPIRY_PERIOD_MILLISECONDS = 15000
|
||||
TYPING_STARTED_EXPIRY_PERIOD_MILLISECONDS = 45000
|
||||
|
||||
# How long after a user has stopped interacting with the compose UI
|
||||
# that a client should send a stop notification to the server.
|
||||
TYPING_STOPPED_WAIT_PERIOD_MILLISECONDS = 5000
|
||||
TYPING_STOPPED_WAIT_PERIOD_MILLISECONDS = 12000
|
||||
|
||||
# How often a client should send start notifications to the server to
|
||||
# indicate that the user is still interacting with the compose UI.
|
||||
TYPING_STARTED_WAIT_PERIOD_MILLISECONDS = 10000
|
||||
TYPING_STARTED_WAIT_PERIOD_MILLISECONDS = 30000
|
||||
|
||||
# The maximum number of subscribers for a stream to have typing
|
||||
# notifications enabled. Default is set to avoid excessive Tornado
|
||||
|
|
Loading…
Reference in New Issue