laravel / blog-contest-may-mayhem

242 stars 16 forks source link

How to make Laravel faster #11

Open hhxsv5 opened 6 years ago

hhxsv5 commented 6 years ago

How to make Laravel faster

jamesmills commented 6 years ago

Just to be clear, the php artisan optimize command is deprecated as of 5.5, and a commit in master has removed it from 5.6.

https://laravel-news.com/laravel-5-6-removes-artisan-optimize

hhxsv5 commented 6 years ago

@jamesmills 👍Thank you. I won't change the post for fair contest.

jamesmills commented 6 years ago

One thing I would mention in this article would be to enable OPcache. There is a helpful package for Laravel here https://github.com/appstract/laravel-opcache which has a link to an article explaining what it can do for your Laravel app.

hhxsv5 commented 6 years ago

Yeah. In my opinion, OPcache is an easier and more effective way to improve performance than others.

georgeboot commented 6 years ago

Did you also look into php-pm?

hhxsv5 commented 6 years ago

Sure, php-pm is earlier solution to hold code in memory before Swoole and Workerman. The most important reason, Swoole is written in C, and can call OS API, so that it provides multithreading/millisecond timer/built-in Coroutine.