From accba58f45e827cc64ee4a6f15869915a72ae10c Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 7 Jan 2025 13:45:24 -0800 Subject: [PATCH] Extend time interval between check for GPU device to save mobile device cycles. --- src/lib/workers/powgpu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/workers/powgpu.ts b/src/lib/workers/powgpu.ts index 65620c6..054a13b 100644 --- a/src/lib/workers/powgpu.ts +++ b/src/lib/workers/powgpu.ts @@ -469,7 +469,7 @@ export class PowGpu extends WorkerInterface { // Ensure WebGPU is initialized before calculating, up to a max time frame while (PowGpu.#device == null && performance.now() < 8000) { await new Promise(resolve => { - setTimeout(resolve, 100) + setTimeout(resolve, 500) }) } if (PowGpu.#device == null) throw new Error(`WebGPU device failed to load.`) -- 2.34.1