// the find
aidenybai/million
Optimizing compiler for React
Million.js is a compiler and virtual DOM layer that sits on top of React, replacing its reconciler for marked components with a 'block' approach that skips tree diffing and directly updates known DOM nodes. It targets React apps with large, mostly-static component trees where reconciliation overhead is measurable. The pitch is drop-in speed gains without rewriting your components.
The block-based approach is genuinely clever: by statically analyzing JSX at compile time, it can emit direct DOM updates instead of running a full diff, which is a real algorithmic win for list-heavy UIs. The automatic mode (npx million@latest) handles instrumentation without manual block() wrapping, lowering the adoption bar significantly. The compiler is Vite/webpack/Next.js compatible and the monorepo structure is clean — separate packages for core vdom, react compat, compiler, and JSX runtime with no circular nonsense. Benchmark numbers on the js-framework-benchmark are honest and linkable, not made up.
The 'automatic' compiler mode is fundamentally heuristic — it can't statically know which components actually have hot render paths, so it either wraps too aggressively (breaking components with dynamic children or context consumers) or too conservatively (missing the actual bottlenecks). The constraint that block() components can't have dynamic structure — no conditional children, no arbitrary JSX children — means any non-trivial component needs manual audit or falls back to React anyway, which blunts the value proposition for real apps. Development on the repo has slowed noticeably: the last push was 2026-05 but issues show a long tail of unresolved compatibility problems with React 19 and concurrent features like Suspense and transitions. If your app leans on those, this is not ready.