From: Chris Duncan Date: Tue, 7 Jan 2025 21:45:24 +0000 (-0800) Subject: Extend time interval between check for GPU device to save mobile device cycles. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=accba58f45e827cc64ee4a6f15869915a72ae10c;p=libnemo.git Extend time interval between check for GPU device to save mobile device cycles. --- 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.`)