Ross ROSS = Recommend OSS · open-source software intelligence for agents

astoilkov/main-thread-scheduling

Fast and consistently responsive apps using a single function call observed · 2026-08-28

github.com/astoilkov/main-thread-scheduling · TypeScript · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

23/100

  • Activity 1
  • Release rhythm 8
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 2010
  • days_rel: n/a
  • days_push: 597
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1331 stars · 33 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A TypeScript library for running computationally heavy tasks on the browser main thread without freezing the UI, using a simple yieldOrContinue() API. It schedules work with requestIdleCallback, isInputPending, and a global priority queue to keep apps responsive.

Use cases

  • make a synchronous function non-blocking without web workers
  • prevent UI freezes during heavy computation
  • improve INP and Core Web Vitals scores
  • run background tasks without spinning up fans
  • prioritize rendering important elements first
  • run multiple background tasks without degrading performance

When to choose

  • you want to avoid the complexity of Web Workers while keeping the UI responsive
  • you need fine-grained yielding inside long-running main-thread tasks
  • you want a tiny, production-tested scheduling library with a simple API

When to avoid

  • your task is purely CPU-bound and works well in a Web Worker with no DOM access needs
  • you need true parallelism across multiple cores
  • you are working outside a browser environment where scheduling APIs are unavailable

Facets

library · maturity active

concurrency scheduling developer-tools web-development frontend performance browser main-thread event-loop yield isinputpending inp web-vitals typescript non-blocking web-server nodejs

2 sources

Member repositories

RepositoryRoleHealth v2
astoilkov/main-thread-schedulingmain23

For agents

markdown · JSON · MCP: product_card(name="astoilkov/main-thread-scheduling")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem