Laravel 5.1 Do the website, there is no business logic, feel very slow ah!
This issue has been turned off because of an issue where the exact result cannot be obtained
Reply content:
Laravel 5.1 Do the website, there is no business logic, feel very slow ah!
We should start with these aspects to consider the problem
Page load content contains
Server main file (the URL address you requested)
The loading of this file is related to server performance, which includes the performance of the framework, server performance/response speed, database read speed (MySQL optimization, database query), network, DNS resolution speed
Server resource files (css,js, pictures, CSS images, font files, etc. loaded via the main URL address)
This is a resource file, general and server performance is not too direct relationship, is to load the resource files directly onto your machine, without any PHP processing, this slow can not be blamed on PHP. This is related to IO, network, server response
About the first server main file load speed divided into the following parts of the resolution, we open Google's network debug analysis, this is my native speed Laravel 5.1.35, did not do any cache (Optmize,route cache)
The contents of this section are contained in detail understanding resource timing
Connection Initial part: Client queue/Client delay/proxy request initial
Server Response section: Request Send/TTFB (server wait)/content Download
The TTFB we see here is the response speed of our server, which contains
Server-to-PHP processing (PHP processing/parsing speed)
Io loading of files during PHP processing (disk read speed)
Frame resolution Speed
You ask the question should be the second step of the third small problem, frame resolution speed, wherein the framework of the analysis can be the following several optimization methods
Optimization commands
php artisan route:cache # 路由缓存php artisan optmize --force # 程序加载优化
Optimization comparison:
Before optimization:
After optimization:
Want to answer questions
Business logic is self-written ah, Laravel only a luxury house, decoration to rely on their own.
Slow words are not without the various caches:
Artisan Config:cache
Artisan Route:cache
Artisan optimize
Composer Dumpautoload
。。。
The bottleneck of the website in io,php performance problem can be ignored basically.
The bottleneck of the website in io,php performance problem can be ignored basically.
The bottleneck of the website in io,php performance problem can be ignored basically.
Change the Nodejs, it's almost there.
From http://www.hostingadvice.com/blog/comparing-node-js-vs-php-performance/
But when it comes to writing business logic, it's time to complain about slow development.
Slow, you have to go to the location "slow" where the performance bottleneck is.
may be slow front-end rendering
Maybe the network is slow
Maybe your server is slow.
Could be a problem with your program.
Maybe your SQL is slow
Might be a problem with your system design.
Maybe your database is slow.
It could be your server disk slag.
Don't be slow to blame PHP.
Support @jock generally slow is not because of the framework, but they do not use, the framework can be open, generally through the modification and maintenance of n times
Don't know what you're talking about is slow, the problem is not clear, can not help you