[Solved] Why Filament pages slow taking 10s to load initial html? #6120
-
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 58 replies
-
In your service providers, do you have any code that shares data with all views? The reason why there is a high view count is because we use Blade components, but simply rendering them should not take that long. |
Beta Was this translation helpful? Give feedback.
-
Hi Dan, thanks for response. This app is fairly new. AppServiceProvider is bare. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
##Solved Solution: disable zend_extension Xdebug in php.ini Using the Performance Monitor I could track what was reading/writing the most data to my drive. Okay, but I can't be the only one using X-Debug. Do other people only enable it when it's absolutely necessary? PS: Filament pages still take 2x longer to load, though now at 500ms, so that's much better. |
Beta Was this translation helpful? Give feedback.
-
I am getting desperate. I have the same issue. Tried all mentioned methods: disabling xdebug and caching icons, also disabled observing views in debugbar. Still on my local environment initial response takes 9-11 seconds and loading scripts takes 2 seconds each. My queries are trivial and take less than 3ms. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
I also encountered this problem. On a completely clean installation of Laravel 10.40.0 and Filament 3.1.42, I created one simple model, one migration for it with one custom text field and one Filament resource. Going (in UI) to the section of the created resource or using any action, for example, creating a new model record in DB, took a very long time (about 10 seconds). Disabling the Laravel debug panel (barryvdh/laravel-debugbar) or xDebug did not result in success. The problem was on both the Apache and Nginx servers (on Ubuntu 22.04). Experiencedly, I noticed that this problem began to occur with Filament 3.0.28 version (in 3.0.27 everything worked quickly). It turned out that in my case the problem was due to the Adblock Plus extension for the Google Chrome browser. When I turned it off, everything immediately began to work quickly even in the latest versions of Filament and even with enabled xDebug. |
Beta Was this translation helpful? Give feedback.
-
Maybe related, but not sure. I've came across a similar issue, but on the frontend side on LOCAL env (even with a similar setup as production - caching, etc.). It turned out the issue was barryvdh's debugbar which was causing UI to freeze sometimes even for 6-7s. It's probably of the high amount of views Filament uses because it tries to trace them all. |
Beta Was this translation helpful? Give feedback.
-
I've implemented several optimizations, including caching icons, disabling the debugger bar, removing unnecessary packages, and performing a fresh Composer installation. Additionally, I disabled the Zend extension in the 'php.ini' file. Despite these efforts, the performance issue persists. Specifically, the /livewire/update is being called twice initially on every page/route. Even for simple view pages with only one record, it takes more than 15 seconds to load. On listing pages with only 10 paginated records, it takes around 20 seconds to load, with some JavaScript taking additional time after the page is fully rendered. Any advice on how to address these performance issues? |
Beta Was this translation helpful? Give feedback.
-
The problem has not been solved and still exists. Clean installation of |
Beta Was this translation helpful? Give feedback.
-
I blocked the font CDN request (in chrome dev tools) which was taking too long to load Now it is super fast. |
Beta Was this translation helpful? Give feedback.
-
Windows developers should note one of the tips here |
Beta Was this translation helpful? Give feedback.
-
I did a little "research" in this area, you were right! The problem was in the file system between Windows and WSL. I moved the files to WSL, now Filament loads very quickly! Here is a small "guide". I will say right away that I work with WSL as root, so I created it as root. The practice is not very good, but you can always do this for a separate user, replacing the directories with your own.
|
Beta Was this translation helpful? Give feedback.
-
One thing on this topic, I had same issue that none of above answers solved. Weirdly |
Beta Was this translation helpful? Give feedback.
##Solved
Solution: disable zend_extension Xdebug in php.ini
Using the Performance Monitor I could track what was reading/writing the most data to my drive.
"cachegrind" ... which I found out is used by the Zend Extension Xdebug!
Okay, but I can't be the only one using X-Debug. Do other people only enable it when it's absolutely necessary?
PS: Filament pages still take 2x longer to load, though now at 500ms, so that's much better.
Or the page with 3 columns of all relational data, 10 records, takes 630ms