F
Filament4mo ago
Travis

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.
No description
No description
12 Replies
awcodes
awcodes4mo ago
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.
Travis
TravisOP4mo ago
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.
awcodes
awcodes4mo ago
Caching icons and turning off blade views in debug bar’s config could make a difference.
Travis
TravisOP4mo ago
How can i can cache the icons? Also tried without debugbar, same result XD
awcodes
awcodes4mo ago
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
Travis
TravisOP4mo ago
Doesn't seem to make any difference actually. May i send you on PM my code? maybe i'm doing something wring.
awcodes
awcodes4mo ago
Hard to say. But just seems like an issue on the server to me.
Travis
TravisOP4mo ago
Thing is i tried same code locally, with same data, same thing.
awcodes
awcodes4mo ago
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.
Travis
TravisOP4mo ago
@awcodes may i send you the Resource code in PM?
awcodes
awcodes4mo ago
Sure. A repo might be better though if you can share that. These kinds of problems tend to be higher up.
Travis
TravisOP4mo ago
For sure will host it now on a git. @awcodes Have sent you in PM the GitHub repo 🙂
Want results from more Discord servers?
Add your server