From 4ed54cdf6fcd38b9d9f3464f0e25dc955bad57f2 Mon Sep 17 00:00:00 2001 From: Chris Lorenzo Date: Wed, 21 Jan 2026 08:39:29 -0500 Subject: [PATCH 1/2] only processSome if there are updates, add PQ check --- src/core/CoreTextureManager.ts | 2 +- src/core/Stage.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/CoreTextureManager.ts b/src/core/CoreTextureManager.ts index 267f113e..96c323c3 100644 --- a/src/core/CoreTextureManager.ts +++ b/src/core/CoreTextureManager.ts @@ -505,7 +505,7 @@ export class CoreTextureManager extends EventEmitter { } public hasUpdates(): boolean { - return this.uploadTextureQueue.length > 0; + return this.uploadTextureQueue.length > 0 || this.priorityQueue.length > 0; } /** diff --git a/src/core/Stage.ts b/src/core/Stage.ts index 7df38473..367a09fd 100644 --- a/src/core/Stage.ts +++ b/src/core/Stage.ts @@ -471,11 +471,13 @@ export class Stage { // Process some textures asynchronously but don't block the frame // Use a background task to prevent frame drops - this.txManager - .processSome(this.options.textureProcessingTimeLimit) - .catch((err) => { - console.error('Error processing textures:', err); - }); + if (this.txManager.hasUpdates()) { + this.txManager + .processSome(this.options.textureProcessingTimeLimit) + .catch((err) => { + console.error('Error processing textures:', err); + }); + } // Reset render operations and clear the canvas renderer.reset(); From d978b7af71f95a4fdb3ce5c31b2bdb9982645d58 Mon Sep 17 00:00:00 2001 From: Chris Lorenzo Date: Wed, 21 Jan 2026 10:33:56 -0500 Subject: [PATCH 2/2] truth check --- src/core/Stage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Stage.ts b/src/core/Stage.ts index 367a09fd..ceb10deb 100644 --- a/src/core/Stage.ts +++ b/src/core/Stage.ts @@ -471,7 +471,7 @@ export class Stage { // Process some textures asynchronously but don't block the frame // Use a background task to prevent frame drops - if (this.txManager.hasUpdates()) { + if (this.txManager.hasUpdates() === true) { this.txManager .processSome(this.options.textureProcessingTimeLimit) .catch((err) => {