Skip to content

Implement exponential backoff for texture loading retries#750

Draft
pecoram wants to merge 2 commits intolightning-js:v2from
pecoram:refactor/exponential-retry-backoff
Draft

Implement exponential backoff for texture loading retries#750
pecoram wants to merge 2 commits intolightning-js:v2from
pecoram:refactor/exponential-retry-backoff

Conversation

@pecoram
Copy link
Contributor

@pecoram pecoram commented Mar 5, 2026

Introduce an exponential backoff strategy for texture loading retries to improve resource management and reduce immediate retry attempts after failures.

@jfboeve jfboeve requested a review from wouterlucas March 6, 2026 09:32
this.txMemManager.frameTime = newFrameTime;

// Process texture retries with exponential backoff
this.txManager.processTextureRetries();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt it be better to make this part of processSome to put a time budget on it?

*/
processTextureRetries(): void {
for (const texture of this.retryQueue) {
// load() will check canRetryNow() internally and only proceed if backoff has elapsed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should check for retry early on before calling load, else we're just wasting calls.

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