Autocomplete debounce does not work as expected
To optimize load of
/mentions/autocomplete I set the
debounce option of jQuery textcomplete to 500 ms. This should have made the autocomplete function be called with the delay.
In practice, however, with this option set the autocomplete function sometimes is not getting called at all, ever. Usually, this happens, when I put just
user:, i.e., a user link without any term (without a part of login, name or identifier). If, however, I add any character and then remove it (i.e., get the same
user: in result), the autocompletion gets executed.
If I remove the
debounce option, everything works as expected. This makes me think, that the problem is in how jQuery textcomplete handles the debounce.
#2 Updated by Andriy Lesyuk almost 2 years ago
- % Done changed from 0 to 50
In r94 I made it possible to configure the debounce. By default, it’s 500 ms, so the bug takes place. As a workaround users can set it to 0, in this way disabling it. However, this will increase load of