bookwyrm/bookwyrm/static/js
Wesley Aptekar-Cassels 43ad3d0c15 Improve polling algorithm
The existing polling code had a few problems:

* It started the timer for a new request when the first request was
  sent, rather than when a response was received.
* It increased the delay regardless of whether the response was a
  success or a failure.

This commit changes it to a more standard exponential backoff system,
where it starts with a 5 minute ± 30 second delay, and uses that same
delay until it hits an error, at which point the delay is increased by
10%. Once it receives a successful response again, the delay is reset to
the default.

I suspect this should be nicer on the server, since it avoids the
initial sending of many requests. After about half an hour of leaving
the page open, the request rate for this new code will be higher than
that of the old code, so it's possible that this may cause problems, but
I think that a five-minute request frequency should be pretty reasonable.
2023-03-07 13:15:52 -05:00
..
vendor add Shepherd version 10.0.0 2022-06-11 14:19:03 +10:00
autocomplete.js Case insensitive suggestions 2022-01-17 10:52:16 -08:00
bookwyrm.js Improve polling algorithm 2023-03-07 13:15:52 -05:00
forms.js New approach: Event Delegation 2022-12-20 11:36:14 +01:00
guided_tour.js linting fix for linting fix 2022-07-03 17:24:33 +10:00
localstorage.js Runs prettier 2021-12-16 10:53:38 -08:00
status_cache.js Prettier 2022-05-26 12:54:31 -07:00
tabs.js eslint fixes 2022-02-25 13:00:23 -08:00