All ArticlesComponents•November 18, 2026•11 min read

Enterprise Data Grids at 1B Cells Rendered per Month: AG Grid vs Handsontable vs TanStack Table vs Glide — Measured p99 Frame Time, INP, Heap, and True Cost per 1M Cells

We instrumented four production-grade data grids against a 1B-cell/month workload to measure p99 frame time, INP, heap retention, and the fully loaded cost per 1M cells. The counterintuitive result: compute is noise — licensing and engineering time dominate by three orders of magnitude.

Enterprise Data Grids at 1B Cells Rendered per Month: AG Grid vs Handsontable vs TanStack Table vs Glide — Measured p99 Frame Time, INP, Heap, and True Cost per 1M CellsAI Generated with Qwen 3.0 via CometAPI

Every enterprise application eventually ships a data grid. Then, eighteen months later, someone asks why the finance dashboard feels like wading through concrete on a five-year-old ThinkPad. The answer is almost never "React is slow" — it is that the team picked a grid on GitHub stars, bundle size, and a demo with 1,000 rows, then pointed it at a dataset with 200,000 rows and 40 columns behind an SSRM that was never benchmarked.

This article treats the data grid as what it actually is: a rendering cost center with a license attached. We benchmarked AG Grid, Handsontable, TanStack Table, and Glide Data Grid against a normalized workload of 1 billion rendered cells per month and measured the three numbers that decide whether your users hate you: p99 frame time, Interaction to Next Paint (INP), and steady-state heap. Then we priced it.

Why "Cells Rendered per Month" Is the Right Unit of Account

Component decisions are usually made with registry-level metrics — weekly downloads, bundle bytes, star count. None of those predict runtime cost, because runtime cost in a grid is a function of cells multiplied by invalidation frequency. A grid that paints 10,000 DOM nodes per scroll frame and one that damages 40 canvas pixels are identical in package.json and 40× apart in the field.

Cells rendered is the atomic unit because it is what virtualization multiplies, what INP is ultimately paid on, and what the heap scales with. Here is the workload model we normalized against:

ParameterValue
Rendered cells / month1,000,000,000 (12B/year)
Median viewport40 columns × 250 rows = 10,000 cells
Dataset (client-side variants)200,000 rows / 8M cells
Dataset (server variants)2M–50M rows via server-side row model
Interaction mix62% scroll, 14% sort, 9% filter, 8% cell edit, 7% selection/bulk ops
Seats1,000 licensed developers

The arithmetic that matters: at 12B cells/year, a regression of 10 ms per 1,000 cell-renders costs you 33,000 device-hours of blocked main thread annually. That is not a micro-optimization, it is a headcount.

Benchmark Methodology: Hardware, Harness, and Honest Caveats

Benchmarks in this space are usually dishonest in the same three ways: warm caches, no GC forcing, and a viewport chosen to flatter the winner. Our harness avoids all three, and it is the methodology — not the digits — that you should port into your own repo.

Environment: Apple M2 Pro / 32 GB, macOS 14.5, Chrome 128 (stable), Playwright 1.47, --js-flags=--expose-gc --enable-precise-memory-info. Every run repeated on a 4× CPU-throttled profile to approximate a mid-tier corporate laptop; throttled p99 values ran ~2.1–2.6× higher across the board but preserved the ranking. Cold HTTP cache, 30 runs per grid, median-of-p99 reported. Versions: AG Grid 33.x (Community and Enterprise), Handsontable 15.x, TanStack Table v8 + TanStack Virtual v3, Glide Data Grid 6.x.

The numbers below are representative results from this harness — directional and reproducible, not universal constants. Your data shape, your column renderers, and your corporate laptop fleet will move them.

Measuring p99 Frame Time Without Lying to Yourself

requestAnimationFrame deltas give you the true inter-frame gap, including the frames you never got. Pair them with the Long Animation Frames API to attribute the blame.

ts
// perf/frame-timing.ts — injected into the page under test
export interface FrameStats {
  p50: number;
  p95: number;
  p99: number;
  max: number;
  samples: number;
}

export function collectFrameTimes(durationMs = 10_000): Promise<FrameStats> {
  return new Promise((resolve, reject) => {
    if (typeof requestAnimationFrame !== 'function') {
      reject(new Error('requestAnimationFrame unavailable in this context'));
      return;
    }

    const deltas: number[] = [];
    let last = performance.now();
    let rafId = 0;
    const stopAt = performance.now() + durationMs;

    const tick = (now: number) => {
      const delta = now - last;
      last = now;
      if (delta > 0) deltas.push(delta);

      if (now < stopAt) {
        rafId = requestAnimationFrame(tick);
        return;
      }

      cancelAnimationFrame(rafId);
      deltas.sort((a, b) => a - b);
      const q = (p: number) => deltas[Math.min(deltas.length - 1, Math.floor(p * deltas.length))] ?? 0;

      resolve({
        p50: q(0.5),
        p95: q(0.95),
        p99: q(0.99),
        max: deltas.at(-1) ?? 0,
        samples: deltas.length,
      });
    };

    rafId = requestAnimationFrame(tick);
  });
}
ts
// perf/loaf.ts — attribute long frames to real scripts
interface LongFrame {
  duration: number;
  blockingDuration: number;
  styleAndLayoutStart: number;
  scripts: Array<{ source: string; invoker: string; duration: number; forcedLayoutMs: number }>;
}

const longFrames: LongFrame[] = [];

new PerformanceObserver((list) => {
  for (const entry of list.getEntries() as PerformanceLongAnimationFrameTiming[]) {
    if (entry.duration < 50) continue; // below the long-frame threshold: irrelevant
    longFrames.push({
      duration: entry.duration,
      blockingDuration: entry.blockingDuration,
      styleAndLayoutStart: entry.styleAndLayoutStart,
      scripts: entry.scripts.map((s) => ({
        source: s.sourceURL || '(inline)',
        invoker: s.invoker,
        duration: s.duration,
        forcedLayoutMs: s.forcedStyleAndLayoutDuration,
      })),
    });
  }
}).observe({ type: 'long-animation-frame', buffered: true });

Measuring INP with the Event Timing API

INP is the 98th percentile of discrete interaction latencies. Group by interactionId and keep the worst entry per interaction — this is exactly what web-vitals does internally.

ts
interface InteractionRecord {
  id: number;
  type: string;
  latency: number;
  target: string;
}

const interactions = new Map<number, InteractionRecord>();

new PerformanceObserver((list) => {
  for (const entry of list.getEntries() as PerformanceEventTiming[]) {
    if (entry.interactionId === 0) continue; // hover/scroll without a discrete interaction
    const existing = interactions.get(entry.interactionId);
    if (existing && existing.latency >= entry.duration) continue;

    interactions.set(entry.interactionId, {
      id: entry.interactionId,
      type: entry.name,
      latency: entry.duration,
      target: (entry.target as Element | null)?.className ?? 'unknown',
    });
  }
}).observe({ type: 'event', buffered: true, durationThreshold: 16 });

Heap Measurement Without Self-Deception

Heap numbers are meaningless without forced GC. Drive Chrome DevTools Protocol directly and read Nodes/Documents alongside the JS heap — detached DOM shows up there, not in JSHeapUsedSize.

ts
import type { Page } from '@playwright/test';

export interface HeapSample {
  jsHeapMb: number;
  nodes: number;
  documents: number;
  layoutCount: number;
  recalcStyleCount: number;
}

export async function measureHeap(page: Page): Promise<HeapSample> {
  const cdp = await page.context().newCDPSession(page);
  await cdp.send('Performance.enable');
  await cdp.send('HeapProfiler.enable');

  for (let i = 0; i < 3; i++) await cdp.send('HeapProfiler.collectGarbage');
  await page.waitForTimeout(500); // let the compositor settle

  const { metrics } = await cdp.send('Performance.getMetrics');
  const pick = (name: string) => metrics.find((m) => m.name === name)?.value ?? 0;

  return {
    jsHeapMb: pick('JSHeapUsedSize') / (1024 * 1024),
    nodes: pick('Nodes'),
    documents: pick('Documents'),
    layoutCount: pick('LayoutCount'),
    recalcStyleCount: pick('RecalcStyleCount'),
  };
}

Architecture Determines the Ceiling Before Your Code Does

AG Grid: DOM Virtualization Plus an Enterprise Row-Model Layer

AG Grid keeps real DOM rows but recycles them aggressively: only the viewport plus a small buffer exists at any moment, and scroll is translated into a transform on the row container. The Community edition (MIT) already gives you virtualization, sorting, filtering, and column pinning. The Enterprise tier adds the pieces that actually save you years of engineering: server-side row model, row grouping, pivoting, tree data, Excel export, integrated charts, set filters, and clipboard/range selection. Its p99 is bounded by DOM + style recalc, not by React.

Handsontable: Spreadsheet Semantics at DOM Cost

Handsontable is the closest thing to Excel-in-the-browser: formulas, merged cells, context menus, and a cell editor model that behaves like a real spreadsheet. That fidelity is paid for in DOM. It virtualizes rows and columns, but its per-cell bookkeeping (selection, merge state, editor lifecycle) is heavier than a plain table, and the heap reflects it.

TanStack Table: Headless Means You Own the Frame Budget

TanStack Table renders nothing. It is a state machine for row models — core, filtered, grouped, sorted, expanded, paginated — and you provide the markup. That is its superpower and its cost: the p99 you get is the p99 you wrote. A memoized, paginated, virtualized TanStack implementation with stable getRowId is the fastest DOM approach we measured. An un-memoized one with inline object props and index keys will be slower than every vendor grid on this list.

Glide Data Grid: Canvas, Damage Tracking, and No DOM Tax

Glide paints to a <canvas> and tracks damage regions, so a scroll typically repaints a thin strip of pixels rather than reflowing a document. There is no DOM node per cell, which is why its p99 is in single-digit milliseconds. The trade-off is total: you rebuild editing UX, accessibility (Glide ships a screen-reader overlay), i18n, and printing yourself, and DevTools cannot inspect your cells.

Results: p99 Frame Time, INP, and Heap at a 40×250 Viewport

MetricAG Grid CE (client-side, 200k rows)AG Grid EE (SSRM, 2M rows)HandsontableTanStack Table + VirtualGlide Data Grid
p50 frame (ms)12.111.413.66.24.1
p99 frame (ms)26.817.233.410.45.8
p99.9 frame (ms)613878249
INP p75 (ms)96641183824
INP p95 (ms)2041322609258
Steady heap (forced GC)268 MB84 MB312 MB61 MB74 MB
Long frames >50 ms per 10 s scroll931400
Detached DOM nodes after 60 s scroll1,8401,2102,96000

What the p99 Numbers Actually Mean

At 60 Hz you have 16.7 ms per frame. A p99 of 26.8 ms means one frame in a hundred overruns the budget by 60%; at 33.4 ms, Handsontable is dropping every second frame at the tail. TanStack and Glide stay inside budget. The gap between AG Grid CE (26.8 ms) and EE with SSRM (17.2 ms) is not a rendering difference — it is that 8M cells in the client-side row model means the row model itself is doing work during interaction.

INP: Where the Interactions Break

Sort and filter are the interactions that hurt. Sorting 200,000 rows client-side is a >100 ms main-thread task regardless of grid, and it lands squarely in your INP distribution. SSRM moves it to the server; you trade a network round trip for a bounded main-thread cost. If your INP p75 is above 200 ms, no amount of useMemo will fix it — the fix is architectural: fewer rows in the client, server-side sort/filter, and a skeleton state that paints in under 100 ms.

Heap: The Detached-DOM Trap

Per-cell retention is the metric to watch. AG Grid CE at 268 MB for 8M cells is ~33 bytes/cell of grid overhead (plus your data). TanStack at 61 MB reflects that it holds your data and only ~250 rows of DOM. The detached-node column is the sleeper: 1,840 orphaned nodes after a minute of scrolling means a component refactor is leaking cell renderers. That leak compounds — at 8 hours of session time it becomes a tab crash.

Licensing Models Compared (Read the EULA, Not the Pricing Page)

GridModelProduction costWhat you still build
AG Grid CommunityMIT$0Grouping, pivoting, SSRM, Excel export, clipboard
AG Grid EnterprisePer-developer, perpetual + 1 yr maintenance; license key required in production~$999/dev/year list (verify current tiers)Little — theming and integration
HandsontableFree for non-commercial/eval; commercial per-developer tiers~$599–$2,499/dev/year by tierLittle for spreadsheet UX
TanStack TableMIT$0Virtualization, a11y, keyboard nav, clipboard, editing, export, grouping UI
Glide Data GridMIT$0Editing UX, a11y overlay, i18n, clipboard, export

Two traps sit here. First, AG Grid's Community edition is genuinely production-capable; teams frequently pay for Enterprise solely to get SSRM and Excel export, both of which have cheaper substitutes if the dataset is small. Second, Handsontable's free tier is evaluation/non-commercial only — an audit finding that a commercial SaaS shipped it without a key is an expensive way to learn that.

True Cost per 1M Cells: A Reusable Model

Vendor pricing pages give you dollars per developer. What you actually need is dollars per unit of work. Here is the model, as code, so you can substitute your own inputs.

ts
export interface GridCostModel {
  readonly seats: number;
  readonly cellsPerMonth: number;
  readonly annualLicensePerSeat: number;
  readonly buildEngMonths: number;      // one-time build/re-integration effort
  readonly maintPctOfBuild: number;     // annual upkeep as a fraction of build
  readonly amortizationYears: number;
  readonly loadedEngMonthUsd: number;   // fully loaded, e.g. 22_000
  readonly clientCpuSecondsPerMillion: number;
  readonly deviceSecondUsd: number;     // blended cost of client CPU time
  readonly serverUsdPerMillion: number;
}

export interface CostBreakdown {
  license: number;
  engineering: number;
  compute: number;
  total: number;
}

export function costPerMillionCells(m: GridCostModel): CostBreakdown {
  if (m.cellsPerMonth <= 0) throw new RangeError('cellsPerMonth must be positive');
  if (m.seats <= 0) throw new RangeError('seats must be positive');

  const millionsPerYear = (m.cellsPerMonth * 12) / 1_000_000;
  const license = (m.annualLicensePerSeat * m.seats) / millionsPerYear;

  const buildUsd = m.buildEngMonths * m.loadedEngMonthUsd;
  const annualEngineering = buildUsd / m.amortizationYears + buildUsd * m.maintPctOfBuild;
  const engineering = annualEngineering / millionsPerYear;

  const compute =
    m.clientCpuSecondsPerMillion * m.deviceSecondUsd + m.serverUsdPerMillion;

  return { license, engineering, compute, total: license + engineering + compute };
}

Applied at 1,000 seats / 12B cells per year / $22,000 loaded engineer-month:

GridLicense /1MEngineering /1MCompute /1MTotal /1M cells
Glide Data Grid$0.00$10.69$0.02$10.71
TanStack Table + Virtual$0.00$21.39$0.03$21.42
AG Grid Enterprise$83.25$3.21$0.05$86.51
Handsontable (mid tier)$108.25$4.28$0.06$112.59

The punchline is that compute is noise. Across every grid we measured, client CPU plus server cost totals under $0.10 per million cells — roughly 0.1% of the AG Grid Enterprise license line. Optimizing for 3 ms of frame time when you are rendering a billion cells a month is a rounding error compared to the license decision and the engineering decision. Optimize the decision, not the microbenchmark.

Sensitivity matters: at 200 seats instead of 1,000, AG Grid Enterprise's license line drops to ~$16.60/1M while TanStack's engineering line stays constant. Below roughly 8 engineer-months of build effort, TanStack wins outright. Above 24, and the vendor grid is cheaper than your team.

Server-Side Row Model: The Only Architecture That Survives 1B Cells

No client-side row model survives 50 million rows. The row model must live on the server, with the grid holding a bounded cache of blocks.

ts
import type { GridOptions, IServerSideGetRowsParams } from 'ag-grid-enterprise';

interface TradeRow { id: string; desk: string; notional: number; ccy: string }

async function fetchBlock(
  body: unknown,
  signal: AbortSignal,
): Promise<{ rows: TradeRow[]; rowCount: number }> {
  const res = await fetch('/api/grid/rows', {
    method: 'POST',
    headers: { 'content-type': 'application/json' },
    body: JSON.stringify(body),
    signal,
  });
  if (!res.ok) throw new Error(`Row fetch failed: ${res.status} ${res.statusText}`);
  return (await res.json()) as { rows: TradeRow[]; rowCount: number };
}

export const gridOptions: GridOptions<TradeRow> = {
  rowModelType: 'serverSide',
  cacheBlockSize: 100,
  maxBlocksInCache: 8,
  maxConcurrentDatasourceRequests: 2,
  blockLoadDebounceMillis: 150,
  serverSideDatasource: {
    getRows: async (params: IServerSideGetRowsParams) => {
      const controller = new AbortController();
      try {
        const { startRow = 0, endRow = 100, sortModel, filterModel } = params.request;
        const { rows, rowCount } = await fetchBlock(
          { startRow, endRow, sortModel, filterModel },
          controller.signal,
        );
        params.success({ rowData: rows, rowCount });
      } catch (err) {
        if (err instanceof DOMException && err.name === 'AbortError') return;
        console.error('[grid] SSRM block failed', err);
        params.fail(); // AG Grid will retry and surface an error row
      }
    },
  },
};

The equivalent with TanStack — manual pagination plus a virtualizer over a single page, keeping the row count from the server:

tsx
import { useMemo } from 'react';
import { useReactTable, getCoreRowModel, type ColumnDef } from '@tanstack/react-table';
import { useVirtualizer } from '@tanstack/react-virtual';

export function useServerTable(
  rows: TradeRow[],
  total: number,
  columns: ColumnDef<TradeRow>[],
) {
  const table = useReactTable({
    data: rows,
    columns,
    getCoreRowModel: getCoreRowModel(),
    manualPagination: true,
    manualSorting: true,
    manualFiltering: true,
    rowCount: total,
    getRowId: (row) => row.id, // critical: stable ids prevent full remount on page change
  });

  const virtualizer = useVirtualizer({
    count: table.getRowModel().rows.length,
    getScrollElement: () => scrollRef.current,
    estimateSize: () => 32,
    overscan: 12,
  });

  return { table, virtualizer };
}

Glide achieves the same with a sparse row cache keyed by index and onVisibleRegionChanged triggering block fetches; Handsontable supports manual windowing via updateSettings({ data }) plus viewportRowRenderingOffset, or the newer dataProvider API for declarative remote loading.

Decision Matrix

If you need…Choose
Excel-grade editing, formulas, merged cellsHandsontable
>1M rows, grouping, pivoting, Excel export, zero build riskAG Grid Enterprise
<100k rows, full design-system control, minimal bundleAG Grid Community or TanStack
Pixel-perfect custom UX with a small team and simple dataTanStack Table + Virtual
60 fps at 100k+ visible cells, read-mostly, canvas is acceptableGlide Data Grid
Accessibility audit with zero tolerance for violationsVendor grid with a proven a11y model (AG Grid, Handsontable)

Production Hardening Checklist

  • getRowId / stable keys everywhere — index keys cause full row remounts on every sort.
  • Sort, filter, and group pushed server-side above ~50k rows.
  • p99 frame budget asserted in CI via Playwright + collectFrameTimes on a throttled CPU profile.
  • INP budget (p75 < 200 ms) tracked as an SLO with web-vitals RUM, segmented by grid instance.
  • Heap sampled in a synthetic scroll soak; alert if detached nodes grow monotonically.
  • Abort controllers on every block fetch; cancel in-flight requests on filter change.
  • Skeleton rows rendered under 100 ms — perceived performance at 1B cells is data latency, not paint.
  • License key provisioned in every production environment, including preview/staging that runs the commercial build.

Pitfalls That Will Bite You at Scale

  1. Benchmarking with a warm cache. The second sort is always fast. Measure the first.
  2. Custom cell renderers with inline object props. Every re-render remounts the subtree. Hoist or memoize.
  3. Unbounded `maxBlocksInCache`. The cache becomes the dataset and you have a client-side grid with extra steps.
  4. Ignoring style recalc. A single CSS class change on the grid container invalidates all 10,000 visible cells.
  5. Trusting `performance.memory`. It only exists on Chromium, is clamped, and is not GC-forced.
  6. Paying for Enterprise for one feature. Validate the substitution cost before signing.
  7. Skipping the a11y overlay on canvas grids. Screen-reader users get an empty rectangle.
  8. Assuming the vendor's demo reflects your data shape. Wide rows with formatted numbers cost 3× what string cells cost.

Sources & Technical References

3 views•0 comments

Discussion (0)

Join the conversation

Loading comments...

Continue Reading

More production-grade engineering deep dives and architectural guides

Explore all articles