AdapTable Performance
Summary
- AdapTable is designed to work in even the most demanding data environments
- If a live Grid is slow, profile first, then apply the tips below
- The demos show AdapTable with 100,000 rows — with and without styles and ticking updates
If Support sees slowness, record a profile before changing configuration. The usual causes are listed under Performance Tips; the demos below are for reproducing load.
Big Data
AdapTable is designed to work seamlessly with very large data sets.
Hint
- For grids with fewer than 100,000 rows we recommend using the Client-Side Row Model
- For larger grids the Server-Side Row Model is required - also supported by AdapTable.
- This demo loads 100,000 rows (and 20 columns)
- We have deliberately added very few styles or formats to allow you to add your own objects and test performance
Performance Tips
We leverage the excellent visualisation provided by AG Grid to ensure that styles are only applied to currently visible cells and rows.
Here a few tips to improve the performance of AdapTable:
- Use Quick Search as Filter very sparingly; but if used then look at leveraging AG Grid's Quick Filter Cache
- Avoid using Badge Styles in cells which are updating regularly, and particularly if using Flashing
Performance Advisor Rules
The Advisor tab of AdapTable DevTools checks the live configuration against the rules below. Each finding links to its rule here.
Note
The rules run in DevTools, so they add nothing to AdapTable. The facts they check are available to scripts and AI agents through getPerformanceContext() in the DevTools in-page API
Note
Two rules use the Hot Paths results of a DevTools recording (with Hot Paths ticked) (re-filtering on data changes, IN filter values); the others read the current configuration
Quick Search Filter Cache
Quick Search as Filter without AG Grid's Quick Filter Cache: every keystroke builds the searchable text of every row again (a warning above 10,000 rows). Set cacheQuickFilter: true in the AG Grid options, or set quickSearchOptions.filterGridAfterQuickSearch to false so Quick Search only highlights matches.
Calculated Column Chains
Calculated Columns that reference each other 3 or more levels deep: each level evaluates the levels below it for every row. Turn on AG Grid's valueCache, or reference the underlying data columns directly.
Calculated Column Value Cache
3 or more scalar Calculated Columns without AG Grid's valueCache, when they reference each other or the Grid has 50,000+ rows: their values are computed again on every render, sort and filter.
Badges on Flashing Columns
Badge Styles on columns with Flashing Cells: a Badge cell is rebuilt (its rules evaluated and a component mounted) on every change. Use a Format Column style for those columns, or remove the Flashing Cell definition from them.
Data Change History Limit
Data Change History without maxDataChangesInStore keeps every change, each holding a reference to its row: with ticking data the log, and the JS heap, grows for as long as the page is open (critical above 10,000 entries).
Format Columns Scoped to All Columns
A Format Column with a Rule and Scope "All": the Rule is evaluated for every rendered cell of every visible column, on every scroll and refresh. Narrow the Scope to the columns that need it.
Many Format Columns on One Column
More than 5 conditional Format Columns on one column: each rendered cell evaluates all of them. Combine rules that share a style, or move rarely used ones to a separate Layout.
Invalid Expressions
An Expression that cannot be evaluated is validated and logged again each time it is used, costing time on every evaluation and filling the console. Fix or delete it.
Observable Expression History
Observable and Aggregation expressions keep a rolling history of changes in memory (a warning above 1,000,000 entries). Use the shortest WITHIN() windows that work, and lower expressionOptions.maxHistoryPerCell / maxTimeframeSize if you do not need long windows.
Large Client-Side Grids
More than 100,000 rows in the Client-Side Row Model: sorting, filtering and grouping all run in the browser. Load only the rows the user needs, or move to the Server-Side Row Model and let the server sort, filter and group.
Autogenerated Primary Key
Without a unique data column AdapTable adds an id to each row (see Primary Key): updates can then only find rows by object identity, and reloaded data gets new ids, so Notes, Comments, Data Change History and row selection cannot follow rows across reloads. Set primaryKey to a column with unique values (or a composite you add to the data).
Re-filtering on Data Changes
Measured by a recording with Hot Paths ticked: data changes triggering a full re-filter of the Grid at least once a second. AdapTable re-filters on every change while a Grid Filter is active, or when a changed column has a Column Filter (critical above 10,000 rows). Avoid Grid Filters and Column Filters on columns that tick, or batch updates (e.g. api.gridApi.updateGridData with several rows at once) so the Grid re-filters once per batch.
Prepared Expression Cache
AdapTable turns each rule (Format Column conditions, Alert rules, Flashing Cell rules, Badge conditions, the Grid Filter) into a prepared evaluator the first time it runs, and keeps the 64 most recently used. With more distinct rules than that they keep pushing each other out: each one pushed out is parsed and prepared again when next needed, and an Observable rule can stop recording its change history meanwhile. Merge rules that apply the same style, and write a condition used in several places once, as a Named Query referenced with QUERY().
IN Filter Values
Measured by a recording with Hot Paths ticked: building an IN filter's list reads the column in every row and counts its distinct values, when the filter is opened or shown and again after filters change or rows are added. On columns with many distinct values use a text or number filter, or provide customInFilterValues and return the values a page at a time (hasMore).
- This demo also loads 100,000 rows (and 20 columns)
- The
PriceandAmountcolumns are updated 400 times per second - We have added a number of style-related elements to the Grid:
- Custom Flashing Cells to the ticking
PriceandAmountcolumns - A Conditional Style to the
Total Valuecolumn (when > 80) - note thatTotal Valueis a Calculated Column and also updates in real time - A Row-based Conditional Style (Bold & Italic and Purple) where the
Product Nameis "Car" or "Bike" - A Date Display Format for the
Order DateandDue Datecolumns - A Percent Bar Style to the
Price Changecolumn - A Badge Style to
Product Namecolumn (with different style based on cell value)
- Custom Flashing Cells to the ticking