Table Performance - Bulk Actions
Hey guys,
i have a pretty large Table using filament which needs to handle 1000 - 10k entries,
but it seems like it's having a hard time only with 100...
I noticed whenever i disable the
bulkActions
function on the table, suddenly from 100 seconds, load time takes only 5 seconds.
Which is still pretty bad, but I can live with that.
Installed Debugbar, can't see any slow query for some reason,
but the request itself takes 100 seconds on the Network tab (F12), while on Debug bar i only see 2-3 seconds (WTF).
and the whole application is stuck, i can't click anything.
I'm exteremely confused, would love to know if anyone had that issue and fixed it by some hack or any filament feature.
Side note: I'm using filament on production, not using it locally.
But it's also happening locally.
https://github.com/gavinsmith8181/CRM
Putting a bounty of 100$ for the one who can make it more performant and much faster.GitHub
GitHub - gavinsmith8181/CRM
Contribute to gavinsmith8181/CRM development by creating an account on GitHub.
12 Replies
If the request takes 100s then there’s a bottleneck somewhere on the server.
Personally sounds like an n+1 issues to me, but I could be wrong.
I also thought so, i added
Model::preventLazyLoading();
And also checked with Debugbar the queries, nothing that could indicate about N+1 or any slow query.
I only using Tables\Actions\DeleteBulkAction::make()
As Bulk action, everything is filament out of the box features, no extended stuff.Caching icons and turning off blade views in debug bar’s config could make a difference.
How can i can cache the icons?
Also tried without debugbar, same result XD
I hear you, but the bulk actions don’t actually do anything unless records are selected and you perform the action. But bulk actions in general don’t delay a server response when rendering a table.
Artisan icons:cache
Doesn't seem to make any difference actually.
May i send you on PM my code?
maybe i'm doing something wring.
Hard to say. But just seems like an issue on the server to me.
Thing is i tried same code locally, with same data, same thing.
Bulk actions are passive until they are executed. So I’m not sure why it would matter to the table.
That’s why I’m thinking there’s a query issue and not a filament or bulk actions issue.
@awcodes may i send you the Resource code in PM?
Sure. A repo might be better though if you can share that. These kinds of problems tend to be higher up.
For sure will host it now on a git.
@awcodes
Have sent you in PM the GitHub repo 🙂