Closed Amnish04 closed 3 weeks ago
In https://github.com/tarasglek/chatcraft.org/pull/627#issuecomment-2095352160, I was advised to use exponential backoff to counter rate limiting of 3 RPM on HQ TTS downloads.
In this PR, I am using the exponential-backoff package to retry any failed operations with increasing delays between failed attempts.
The package size was around 36 kb, so I am using dynamic import to only load it when needed.
Here's how the network tab looks when downloading,
I think I can optimize it more by increasing the startingDelay value, so we don't bombard so many requests. Not sure what else could be better.
startingDelay
This fixes #632
e49090b
View logs
In https://github.com/tarasglek/chatcraft.org/pull/627#issuecomment-2095352160, I was advised to use exponential backoff to counter rate limiting of 3 RPM on HQ TTS downloads.
In this PR, I am using the exponential-backoff package to retry any failed operations with increasing delays between failed attempts.
The package size was around 36 kb, so I am using dynamic import to only load it when needed.
Here's how the network tab looks when downloading,
I think I can optimize it more by increasing the
startingDelay
value, so we don't bombard so many requests. Not sure what else could be better.This fixes #632