如何使 laravel 比 codeigniter 更快的页面加载
How to make laravel to faster page loading than codeigniter
我是 laravel
的新手 它适合编码,但并不比 codeigniter
快多少
我曾使用 codeigniter
它的页面加载小于 5MB,但 laravel
页面加载可能与 8MB 相同。我想和 laravel
一起工作,但我需要建议让 laravel
比 codeigniter
更快
您有很多选项可以加速您的应用程序:
1- run : php artisan optimize
2- disable the debugger
3- disable the services you don`t use in config.app file
4- if you are using homestead or vagrantBox this adds some shared
folders that slows up the process.
5- if you are working in small,medium size project you can use lumen(lightweight version of laravel).
6-Cache your routes by running : php artisan route:cache
7-Cache your config by running : php artisan config:cache
一些其他一般提示 - 与 laravel 相关 - :
1-If you have data that is frequently fetched for example latest articles in a blog or top scores on a list try implementing a caching layer this would enhance your app performance drastically
2-Queues / back ground jobs , are very useful if you have some processes that take time and could be run in the background for example sending an email, crawling the web
并查看这些资源:
https://laracasts.com/discuss/channels/general-discussion/laravel-optimizations-or-speed-ups
http://ionut-bajescu.com/posts/view/improving-your-laravel-application-performance
Is Laravel really this slow?
我是 laravel
的新手 它适合编码,但并不比 codeigniter
我曾使用 codeigniter
它的页面加载小于 5MB,但 laravel
页面加载可能与 8MB 相同。我想和 laravel
一起工作,但我需要建议让 laravel
比 codeigniter
您有很多选项可以加速您的应用程序:
1- run : php artisan optimize
2- disable the debugger
3- disable the services you don`t use in config.app file
4- if you are using homestead or vagrantBox this adds some shared folders that slows up the process.
5- if you are working in small,medium size project you can use lumen(lightweight version of laravel).
6-Cache your routes by running : php artisan route:cache
7-Cache your config by running : php artisan config:cache
一些其他一般提示 - 与 laravel 相关 - :
1-If you have data that is frequently fetched for example latest articles in a blog or top scores on a list try implementing a caching layer this would enhance your app performance drastically
2-Queues / back ground jobs , are very useful if you have some processes that take time and could be run in the background for example sending an email, crawling the web
并查看这些资源:
https://laracasts.com/discuss/channels/general-discussion/laravel-optimizations-or-speed-ups
http://ionut-bajescu.com/posts/view/improving-your-laravel-application-performance
Is Laravel really this slow?