Skip to content

Commit

Permalink
✏️ requestAfterFrame() instead of postMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Jan 17, 2024
1 parent 8001aac commit 7550a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7550a59

Please sign in to comment.