From 7550a5958bedeaea116af0aa1eaddd8ead6e88d4 Mon Sep 17 00:00:00 2001 From: Antonio Stoilkov Date: Wed, 17 Jan 2024 13:07:37 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20`requestAfterFrame()`=20in?= =?UTF-8?q?stead=20of=20`postMessage()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ef2fe0d..b522700 100644 --- a/readme.md +++ b/readme.md @@ -49,7 +49,7 @@ A real-world showcase of searching in 10k files and getting results instantly ## How It Works -- Uses `MessageChannel.postMessage()` and `requestIdleCallback()` for scheduling. +- Uses `requestAfterFrame()` and `requestIdleCallback()` for scheduling. - Stops task execution when user interacts with the UI (if `navigator.scheduling.isInputPending()` API is available). - Global queue. Multiple tasks are executed one by one so increasing the number of tasks doesn't degrade performance linearly. - Sorts tasks by importance. Sorts by [strategy](#scheduling-strategies) and gives priority to tasks requested