Skip to content

Loading retry improvements#6974

Closed
pavle-goloskokovic wants to merge 7 commits intophaserjs:masterfrom
pavle-goloskokovic:loading-retry
Closed

Loading retry improvements#6974
pavle-goloskokovic wants to merge 7 commits intophaserjs:masterfrom
pavle-goloskokovic:loading-retry

Conversation

@pavle-goloskokovic
Copy link
Copy Markdown
Contributor

This PR improves an existing feature:

  • Implemented retries with exponential backoff which is a technique that retries loading with an exponentially increasing delay time, up to a maximum retry count
  • Increased default maxRetries value to 5, which together with exponential backoff increases possible loading error recovery time to ~3 seconds compared to previous less then 100ms
  • Added FILE_LOAD_RETRY event to Loader Plugin to enable listening to retry occurrences
  • FILE_LOAD_ERROR now also emits Event that resulted form an error as an argument to provide more details to user regarding error cause
  • Moved maxRetries setting from FileConfig to XHRSettingsObject provided to any Loader Plugin method call, to make it possible to override value per file, since there is no way to define properties on fileConfig directly
  • Few other fixes along the way

@photonstorm
Copy link
Copy Markdown
Collaborator

Thanks for originally opening this PR. I'm going to close it because we're moving to Phaser v4. If you think this feature is still valid for v4 you're welcome to resubmit it once v4 is live.

@photonstorm photonstorm closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants