solid-software/languagetool_textfield

Slow performance due to incorrect debounce

Closed this issue · 1 comments

Currently debounce waits 3 seconds before doing the API call.
The first API call should fire (almost) right away -- and throttling should affect the next call request.

We should also think of some strategy to NOT ping the API before the user is done typing -- and that's where the current debounce mechanism comes in handy.

Simple solution:

  • Debounce API calls by 500ms, to make sure user has done typing.
  • Add a 3-second timeout after an API call, to prevent pinging >20 times a minute.