exo icon indicating copy to clipboard operation
exo copied to clipboard

refactor(tinychat): improve download progress polling mechanism

Open li-linfeng opened this issue 10 months ago • 0 comments

  • Add exponential backoff retry strategy for download progress polling
  • Replace interval-based polling with while loop and dynamic intervals
  • Add isPolling flag to prevent concurrent polling
  • Add allProgressComplete flag for better completion tracking
  • Remove downloadProgressInterval as it's no longer needed
  • Optimize polling termination conditions

The changes make the download progress tracking more efficient and reliable by:

  1. Using exponential backoff (1s to 32s) when no progress is detected
  2. Automatically stopping polling after max retries or completion
  3. Preventing multiple concurrent polling operations

li-linfeng avatar Feb 19 '25 06:02 li-linfeng