Laravel 本地开发,页面打开速度很慢,基本超过 10 秒,什么解决?
如图所示,
加载页面也太慢了,
按照网上的说法,去掉Google css也没见有效果。
本地开发是Homestead
[upl-image-preview url=http://forum.laravelacademy.org/assets/files/2017-11-13/1510555810-0-qq20171113144018.png]
如图所示,
加载页面也太慢了,
按照网上的说法,去掉Google css也没见有效果。
本地开发是Homestead
[upl-image-preview url=http://forum.laravelacademy.org/assets/files/2017-11-13/1510555810-0-qq20171113144018.png]
4 Comments
php opcache 扩展有安装吗 如果是虚拟机配置较差的话也会影响加载速度 再有安装一个Laravel Debugbar查看下时间都耗在哪里了:https://xueyuanjun.com/post/2774.html
@学院君#1062
这也页面啥都没有,数据库查询都没有,加载耗时7秒多。
如果有数据库查询,页面加载完成,基本耗时要10秒以上。
好尴尬啊。。。。。。。。。
[upl-image-preview url=http://forum.laravelacademy.org/assets/files/2017-11-14/1510589972-0-qq20171114001555.png]
@doalxi#1063 百度下 Xdebug 分析性能 然后根据根据追踪信息查看主要耗时在哪里 再进行优化 这么慢肯定是不正常的 我这里这种页面基本是秒开
@学院君#1064
这是php-fpm慢日志,看出什么蹊跷吗?
[14-Nov-2017 09:09:02] [pool www] pid 3621
script_filename = /home/vagrant/Code/larabbs/public/index.php
[0x00007f0a69a156f0] Composer\Autoload\includeFile() /home/vagrant/Code/larabbs/vendor/composer/ClassLoader.php:322
[0x00007f0a69a15660] loadClass() unknown:0
[0x00007f0a69a15600] spl_autoload_call() unknown:0
[0x00007ffcf066a480] ???() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:271
[0x00007f0a69a15510] createConnection() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:77
[0x00007f0a69a15490] createSingleConnection() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:51
[0x00007f0a69a15410] make() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:119
[0x00007f0a69a15360] makeConnection() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:74
[0x00007f0a69a15230] connection() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:327
[0x00007f0a69a151a0] __call() /home/vagrant/Code/larabbs/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php:336
[0x00007f0a69a14fd0] boot() /home/vagrant/Code/larabbs/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:61
[0x00007f0a69a14f00] handle() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
[0x00007f0a69a14e40] Illuminate\Pipeline{closure}() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
[0x00007f0a69a14d80] Illuminate\Routing{closure}() /home/vagrant/Code/larabbs/vendor/fideloper/proxy/src/TrustProxies.php:56
[0x00007f0a69a14ce0] handle() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
[0x00007f0a69a14c20] Illuminate\Pipeline{closure}() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
[0x00007f0a69a14b60] Illuminate\Routing{closure}() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30
[0x00007f0a69a14ab0] handle() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
[0x00007f0a69a149f0] Illuminate\Pipeline{closure}() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
[0x00007f0a69a14930] Illuminate\Routing{closure}() /home/vagrant/Code/larabbs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30