Skip to content

Reduce number of typing events sent to server

Sonja Heinze requested to merge pitag/fractal:debounce-typing into master

Issue GNOME/fractal#534.

Before, a typing event was sent to the server on every single key release. A lot of sent typing events were redundant due to the timeout functionality implemented in the matrix protocol for typing events. With this commit, this overload of events sent to the server gets avoided by only sending a new typing event, if the last one was sent more than three seconds ago.

The solution is not a standard throttling, since the typing events are not sent exactly in intervals of three seconds. This is a much simpler solution than the throttling approach I considered using gtk::timeout_add.

Edited by Sonja Heinze

Merge request reports