Real-estate investors evaluate a property by comparing it with similar ones nearby: price, size, beds, price per square foot. They don't want ten rows per page. They want every comparable on one screen, so they can scan.

For the Reilitics comparables dashboard, that made density a performance problem before it was a design problem. A table with 100+ rows and a dozen columns is thousands of DOM nodes, and that is what makes dense screens feel sluggish on a mid-range laptop.

Three decisions did most of the work.

1. Normalise once, at the edge

Comparable data came from several public sources, each with its own idea of units, field names and what "missing" means. If every component cleans data its own way, two views of the same property can disagree.

So everything is mapped into one shape before it reaches the UI:

export type Comparable = { id: string; address: string; beds: number | null; baths: number | null; sqft: number | null; price: number | null; pricePerSqft: number | null; soldAt: string | null; }; const SQM_TO_SQFT = 10.7639; export function normalise(raw: RawRecord): Comparable { const sqft = raw.areaUnit === "sqm" && raw.area != null ? Math.round(raw.area * SQM_TO_SQFT) : raw.area ?? null; const price = raw.salePrice ?? raw.listPrice ?? null; return { id: raw.id, address: raw.address.trim(), beds: raw.beds ?? null, baths: raw.baths ?? null, sqft, price, pricePerSqft: price && sqft ? Math.round(price / sqft) : null, soldAt: raw.saleDate ?? null, }; } 

The important detail: missing stays null, never 0. A missing price that becomes zero quietly drags every average down, and nobody notices until a bad decision is made with it.

2. Fetch on the server, and not twice

Comparables are fetched in Next.js server components, so the browser receives HTML with the data already in it. No spinner, no waterfall of client requests.

Comparable data changes slowly, so results are cached and revalidated on an interval:

export default async function ComparablesPage({ searchParams }) { const res = await fetch( `${process.env.DATA_API}/comparables?${new URLSearchParams(searchParams)}`, { next: { revalidate: 3600 } }, // at most once an hour ); const rows: Comparable[] = (await res.json()).map(normalise); return <ComparablesTable rows={rows} />; } 

Most dashboard loads are served from cache. Only the first request after revalidation pays for the upstream fetch.

3. Virtualise instead of paginating

Pagination would have solved the DOM problem, but investors scan; they don't page. Virtualisation keeps the whole set scrollable while only rendering what's on screen:

const parentRef = useRef<HTMLDivElement>(null); const virtualizer = useVirtualizer({ count: rows.length, getScrollElement: () => parentRef.current, estimateSize: () => 44, overscan: 8, }); return ( <div ref={parentRef} className="h-[70vh] overflow-auto"> <div style={{ height: virtualizer.getTotalSize(), position: "relative" }}> {virtualizer.getVirtualItems().map((item) => ( <Row key={rows[item.index].id} row={rows[item.index]} style={{ position: "absolute", top: 0, transform: `translateY(${item.start}px)` }} /> ))} </div> </div> ); 

Only the visible rows plus a small buffer exist in the DOM, recycled as you scroll. Sorting and filtering run on the in-memory array, so they stay instant no matter how many rows are loaded.

Result

The dashboard renders 100+ comparables in under two seconds and scrolls smoothly on ordinary hardware, replacing manual research across tabs and spreadsheets.

Takeaways

  • Set a render budget before designing the table. It changes every choice after it.
  • Keep missing data explicit. null is information; 0 is a lie.
  • Fetch on the server when the data doesn't depend on interaction.
  • Virtualise when users scan; paginate when they search.

Full case study, with the architecture diagram: Reilitics case study.

I'm Ahmad, a full-stack React and Node.js developer who likes data-heavy products. Say hello.