Warper, an open-source React virtualization library powered by Rust and WebAssembly, has released version 7, delivering performance optimizations, improved bundler compatibility, and enhanced developer tooling.
Warper 7.2 introduces several changes, including zero-allocation hot paths using TypedArrays, O(1) circular buffer operations for frame timing, universal bundler support, and responsive demo examples across device viewports.
The library takes a distinctive approach to virtualization by offloading scroll calculations to a Rust-compiled WebAssembly module. Performance-critical operations, including binary search, range calculations, and offset lookups, run in compiled WASM rather than JavaScript. The library maintains a Fenwick tree (binary indexed tree) of item heights, enabling O(log n) prefix sum queries and O(1) lookups for fixed-height items.
A key change in v7 is the replacement of regular arrays with TypedArrays (Int32Array, Float64Array) in hot paths, eliminating garbage collection pressure during scrolling. The release also replaces push()/shift() operations with constant-time circular buffer operations for frame timing, addressing a source of unnecessary allocations in earlier versions.
Getting started with Warper requires a single package install:
npm install @itsmeadarsh/warper
Basic usage involves the useVirtualizer hook, which returns the visible range and offsets for rendering:
import { useVirtualizer } from "@itsmeadarsh/warper";
The library claims significant performance advantages over established alternatives. According to benchmarks shared by the developer on Reddit, testing with 100,000 items showed react-window achieving approximately 40 FPS compared to Warper's 120 FPS. At one million items, the gap widened further, with react-window dropping to approximately 12 FPS while Warper maintained 118 FPS.
The React virtualization space includes several established libraries. react-window, which recently shipped its own v2.0 release with automatic sizing and native TypeScript support, remains the lightest option at approximately 6KB gzipped. TanStack Virtual offers a headless, framework-agnostic approach at around 12KB. react-virtualized, while feature-rich at 25KB, is generally considered a heavier option. Warper sits at approximately 8.7KB gzipped and is the only option in this group to use a WebAssembly engine.
Community reception has been mixed. On Reddit, one user highlighted enthusiasm for the approach but questioned the practical need:
Those numbers you advertise are awesome. BUT, tbh who even needs to render 10M items?"
Another responded:
10M is a stress test to show how well it performs in an unlikely large scenario. But there are uses for tables 1k+ in size especially in the financial industry.
Several users reported compatibility issues in Firefox, with one noting:
Your examples in Chrome won't scroll past line 588673, so claims of 1M+ rows are unverified in any browser that I tried.
The author responded:
I guess it is the default maximum scroll limit of Chrome.
The bundle size has also seen notable improvement. Earlier development versions shipped at over 50KB, which the developer has since reduced to approximately 5.9KB minified and gzipped with what they described as zero performance loss. Universal bundler support now covers Vite, Webpack, Rollup, esbuild, Parcel, and Next.js out of the box.
Documentation is available on the project's GitHub repository. Warper is open source under the MIT license.