How to optimize the performance of an Table
I I have the following interface (see the attached image).
I attach the performance metrics from the debug bar.
It seems too much of a templates and too much models calling.
What are the strategies for optimization in such a cases?
I have background optimizing raw SQL queries but I am kinda new in the Laravel and Filament space and I would appreciate a direction from you.
4 Replies
It's slow because of the debug bar and the views collector.
For performance, ensure your filters options are closures so
fn() => MyOptions
It you want faster experience with debug bar, ensure you disable view collection
And to cache your blade icons
@toeknee I compare this page with the other pages and it is 30-40% slower because it has more filters and columns. Would it help if you use redis caching of the queries? For me the issue does not seems to be from the queries, but anyway, I need to check π
Provide your filters code please
As @toeknee mentioned you absolutely need to turn off view collection in debugbar. Publish the debugbar config and then set
collectors > views
to false.