DataHub needed a table for dataset previews. We wanted to choose properly, so we built the same table nine ways and measured. This page is the reasoning. The picks and the numbers are elsewhere.
DataHub shows a preview of every dataset: the first rows, sometimes all of them, in a table. We needed a library for that table and we wanted to pick it on evidence. The comparison pages online did not help. They are lists: ten libraries, a logo each, a bullet list of features copied from the README, and no opinion about which to use. We could not find one that put the same data through all of them on one page.
So we did. The question was which one to use. The answer is that different jobs get different picks,
and that up to a few thousand rows it is a plain <table>.
Same data. HM Land Registry Price Paid data, real UK house sales, as Parquet. Four
datasets: 1,000 rows in 16 columns; the same 1,000 rows with 64 extra numeric columns, 80 in all; 50,000
rows; and a 500,000-row sample of one year, loaded on demand. Every library gets the same
Array<Object> from the same loader. That is the best input for a plain table and the
worst for a columnar engine like Perspective.
Same harness. Every demo is the same page shell, the same theme tokens and the same mounting code. A demo supplies four render functions, one per dataset, and the harness runs the page, the clock and the scroll test, and empties the host between renders. The same cell formatter runs for every library except Perspective, which has no per-cell formatter hook, so differences on screen come from the library.
Scripted measurements. Render time covers building the DOM and a forced layout, so a
library that returns early cannot report a scheduling call as a render; without the layout flush the
plain table would report a fifth of its real cost. Scroll is a scripted 20,000 px scroll over 120 frames
on the element that scrolls. Sort is the library's own sort call, timed until the sorted rows
are on screen. Every figure is the median of five fresh page loads from
scripts/measure-all.mjs on one laptop (Apple M4, headless Chromium),
on the production build. Bundle sizes and line counts are read from the build output. One number was
timed by hand: Tabulator's 88 seconds with its documented height: "100%" in an unsized parent.
Edit, keyboard and selection tests. On each grid that edits, we double-clicked a price and typed a new one, then pasted three lines onto a price cell, and counted a value only if it reached the data. With Playwright we dragged the mouse across a cell to see if browser text selection works, and pressed Tab from the top of each page until a column header had focus, then Enter, to see if the rows sorted. Those are the feature checks behind the feature table.
Who did what. Agents built and measured the demos under our direction. We set the harness, the datasets and the tests, reviewed each demo, reran the numbers and chose the verdict. Every timing but one comes from a script in the repo that you can run yourself, and every demo page measures again in your browser.
The method and its caveats in full: ANALYSIS.md. The verdict with its reasoning: EVALUATION.md.
TanStack Table with react-virtual, wrapped once as a <DataTable> component in
PortalJS. This is the "build your own" pick. Most people should not start here.
DataHub pages already ship React, so the table costs 24 kB, not 333. We want our own markup and
CSS: a dataset preview has to be text people can find with Ctrl-F and copy a postcode out of, and the
theme is our own CSS variables, with no third-party theme to override. What comes back from TanStack is an
ordinary <table>.
The cost is 150 lines we wrote and maintain: the row and column virtualizers, the spacer cells, the sticky header and the sort buttons. Ctrl-F only sees the mounted rows, so searching a whole dataset needs a search box, and we write that and the keyboard sort too. TanStack v9 is a redesign and its docs lagged it, so we spent part of a day in the type definitions. Both experiments on this site, the summary and filter table and the DuckDB query demo, were built on it without problems.
For a portal that is not React, we would say Tabulator, with a sized parent. For a table in a data
story, we keep writing <table>.
Array<Object>. An Arrow buffer would cut Perspective's 500,000-row figure.docs/reports/measurements-2026-11-21.md. Treat the numbers as an order of magnitude.<table> in React".
Copy demos/baseline.html and src/demos/baseline/main.js, export
meta and four render functions, add the key to DEMOS in
vite.config.js and one entry to src/harness/results.js. Bundle size and line
count then appear by themselves. Corrections and additions on
GitHub.
Contains HM Land Registry data © Crown copyright and database right 2026, licensed under the Open Government Licence v3.0.