Filament's performance
I have some questions about Filament's performance. I'm building an admin panel to manage health information, and while it works, it's quite slow when running locally. I noticed the same issue when testing the Filament demo on my machine.
After deploying it to a VPS, the performance improved, but I feel it could be even better. Has anyone faced similar issues? Any tips on optimizing performance?
I noticed many requests from Livewire, and those requests are always executed when I navigate through the menu. Their duration is also quite long.
I run those php artisan commands always when my docker container is generated.
My goal is replicate the filament demo performance
Thanks in advance!



15 Replies
Slow responses/requests could be caused by many things. Any other information?
Default to anywhere around 10-25 records per page on resources, try not to use a lot of widgets, optimize queries, etc.
did you try icons:cache .... its very important to increase filament performance
Also, use a debugger like Telescope and view the request that was made to /admin/paitents and look at the requests etc.
It could be many reasons, like not using closures, poor indexs etc
run these before testing:
the last one is related with OPCache which is recommended by filament docs
Your docker container has OPCache installed?
Are you on Windows?
Not so much information
Yes, I did
Also make sure your PHP memory limit is set high for local development.
What did u mean by closures?
How could I Google it?
Do I need to teach you how to google something?
I will try, I use all of them, except two
Did u mean to edit memory_limit inside php.ini?
Not yet, it's my first time with OPCache, I work locally on windows, but my docker container runs inside of vps with ubuntu
Yes
Set to -1
If you are using debugbar, make sure you configure it to be friendly with livewire too or else it will really slow everything down https://daudau.cc/posts/fixing-filament-app-slowness-when-using-laravel-debug-bar
Fixing Filament app slowness when using Laravel Debugbar | Blog of ...
By default, Laravel Debugbar enables logging views, which consumes a significant amount of resources in the Filament app. Displaying all view names can potentially c
A massive improvement could be also to not have a request when we want to open a modal. Maybe I missed something
Closures are as per the docs, for example if you have a select filter or select column and are passing in options they should be using closures i.e. ->options(fn($record)=>$record->relationship->options)) instead of say: ->options(User::all()->pluck('id', 'name')
Usually when performance is slow if the page table is <=25 it's down to sloppy code.
Okay. As long is it's not directly on the Windows Filesystem that should be good.
OPCache is a must though
I think that should be the default by now
This is a help thread. Not for feature requests 😅