In most of my applications nowadays, I'm using Filament PHP and Laravel Debug Bar. I'm really happy with how productive this setup is. It works really well, except for a single problem I sometimes run into.
Depending on what you configure as a table in Filament, I've noticed that you can easily make Chrome eat up a complete CPU which brings down performance completely, even on a recent Mac.
After some testing, I noticed that this only happened on my local environment, not on my production deploys.
It turns out that the way Filament builds it's view is using a lot of subviews / components. Debug Bar has a very hard time processing these. Luckily, you can change the setup of Debug Bar to ignore these.
First, you need to ensure you have published the config file from Debug Bar:
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
Once published, you can open the file config/debugbar.php
. In that file, search for the option called collectors
. This config setting instructs Debug Bar what type of data need to be processed. In my case, I changed the setting for views
from true
to false
.
After this simple change, the performance issue was gone.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.