Laravel project on litespeed server is too slow but why ?
I have a livewire project with filamentphp admin panel. When i deploy to litespeed server, site speed is too slow. Memory usage looks 78 mb on laravel debug bar. On the other hand same site in nginx server is too fast and memory usage is 19mb. I deploy lots of wordpress site to litespeed server, all of them are too fast but i don't understand why livewire+filamentphp project is too slow on litespeed server.
Note: Litespeed server created with Cyberpanel
Nginx server created with Laravel Forge
78Mb is huge, and 19Mb is also way too big for a single page. My guess here is that you have some database queries that suffer from n+1, and too many models used and so on.
I would spend time on decreasing the memory usage and the load time locally first, rather than blame Lightspeed or Laravel. You have code that hogs the resources, and most likely are doing things in php that the database does way faster and with way less resources.
I'd recommend watching the Eloquent Performance Patterns course.
Ok i know 19mb is also high. What i am trying to understand is one of them comsume 19mb the other 78mb although they are both same site, the only difference is the server