i have a restful project when make stress test with maximum 500 users the route return status:error
i tried to optimize laravel query and decrease the amount of data which received at every request
but the result of performance not shown
so the question how to optimize my proeject and what are helpfull tools i can use to make best performance as possible
- Replace whereHas and whereDoesntHave with whereIn & whereNotIn
- remove appends from model
- return used data only and remove extra data from responses
2
Answers
There are a few critical parts that you should deeply check and do
php artisan optimize
commandcomposer install --prefer-dist --no-dev -o
I can’t suggest more without looking at the code, so I wrote only general things
barryvdh/laravel-debugbar
is a great package for tracking execution time of each single query, memory usage and other information.