Performances issues when Filament goes in production
Hello,
I have an API that does real time on a specific domain. On this laravel application I've added filament on another specific domain to be able to monitor events. For the moment, the filament panel is empty, there's nothing in it, just a blank page.
It worked fine, but when I put it into production I noticed a 250% increase in memory, -50% requests per instance. We process around 5-6k req/s usually.
I suspect that the service provider is being called for each request even though it has nothing to do with it as the filament.x.com domain is not being called.
Do you have any ideas? Do you think it's possible that the service provider is doing greedy calculations every time laravel calls its service providers even though I've specified that the domain isn't concerned?
What are your recommendations ?
7 Replies
How are you calling the API? does the API run only on the API Route?
thanks for reply @toeknee !
yes all endpoints uses api routes on api.x.com/api/vx/.......
filament is served on filament.x.com/ not api.x.com/admin/
here my provider
use telescope to debug the API Request and see what's booting into it,
@toeknee with telescope i can confirm that one request on api.x.com/api/vx/ use more ressources on a health endpoint
with Filament
Memory usage 48.5 MB
without Filament
Memory usage 44 MB
:/
It will, but what happens when you stack trace it down
I don't have any other stack traces apart from sql queries which have nothing to do with filament. no http calls, no views, no cache related to filament
I suspect some processing was done in the filament service provider independent of the domain (maybe its the goal ?)
@toeknee