Reference
Settings
Fast Tables has one switch per table and a few global settings. The defaults suit most apps. Change a setting only when you measure a reason to.
Set a table method in the table's table() definition. Set a global setting in a service provider's boot() method, or on the plugin: FastTablesPlugin::make()->blockSize(200).
fast()
->fast(bool | Closure $condition = true) turns the fast rows on for one table.
return $table ->columns([...]) ->fast();
A closure receives the table and returns a boolean, so one table can be fast only for some users or page sizes. ->fast(false) turns it off for a table that everyTable() turned on.
everyTable()
FastTablesPlugin::make()->everyTable() turns the fast rows on for every table in a panel. A table opts out with ->fast(false).
fastBlockSize()
->fastBlockSize(int) sets how many rows one request loads for this table. The default is 200 rows, from FastTables::blockSize(). The plugin form is FastTablesPlugin::make()->blockSize(int).
A larger block means fewer requests and a heavier first response. Keep the default unless your rows are very light or very heavy.
fastStrict()
->fastStrict(bool) makes the table throw an exception on an unsupported feature instead of showing the native table.
Strict mode is on by default in the local and testing environments, so you learn about an unsupported feature while you develop. It is off for tables that everyTable() turned on. See Fallback for the features that show the native table.
inlineRows()
FastTables::inlineRows(int) sets how many rows of the page the first HTML carries, so the first paint shows rows before the browser asks for more. The default is 40. Set 0 to carry none. The plugin form is FastTablesPlugin::make()->inlineRows(int).
printLimit()
FastTables::printLimit(int) sets how many rows of a page Fast Tables lays out when the user presses Ctrl/Cmd+P, before the print dialog opens. The default is 1,000 and the minimum is 100. The plugin form is FastTablesPlugin::make()->printLimit(int).
keyIndexAbove()
FastTables::keyIndexAbove(int | false) sets the page size above which Fast Tables keeps the page's record keys in the cache, in page order, once the page has rendered. A block deep in such a page then loads by key instead of by a database offset. An OFFSET costs more the deeper it is: a block at row 999,000 of a million costs 1 to 2 seconds by offset and milliseconds by key.
The default is 100,000 rows. false turns the index off. The plugin form is FastTablesPlugin::make()->keyIndexAbove(int | false). Below the threshold, and before the index is built, a block in the far half of the query is read from the query's end.
The index lives for 5 minutes, or until the query changes through a sort, a filter or a search. In that window, a row added deep in the page's order appears when the index expires. The first 20,000 rows of the page always come straight from the database.
disable() and enable()
FastTables::disable() renders every table natively until FastTables::enable() is called. Use it in a test suite that asserts the native table markup.
Testing
Two Livewire assertions tell you which table rendered: assertFastTableActive() and assertFastTableInactive(). Filament's own assertCanSeeTableRecords() keeps working, because the rows are Filament's markup.