diff --git a/packages/frontend/src/scripts/idle-render.ts b/packages/frontend/src/scripts/idle-render.ts index 838304d1b3..ccce8b02bf 100644 --- a/packages/frontend/src/scripts/idle-render.ts +++ b/packages/frontend/src/scripts/idle-render.ts @@ -1,19 +1,16 @@ -// eslint-disable-next-line import/no-default-export -export default class IdlingRenderScheduler { +class IdlingRenderScheduler { #renderers: Set; - #budget: number; #rafId: number; #ricId: number; - constructor(budget = 0) { + constructor() { this.#renderers = new Set(); - this.#budget = budget; this.#rafId = 0; this.#ricId = requestIdleCallback((deadline) => this.#schedule(deadline)); } #schedule(deadline: IdleDeadline): void { - if (deadline.timeRemaining() > this.#budget) { + if (deadline.timeRemaining()) { this.#rafId = requestAnimationFrame((time) => { for (const renderer of this.#renderers) { renderer(time);