1
Magician Oct 19, 2017 via iPhone echo 0.000000000001 微秒 自我催眠
|
2
takanasi Oct 19, 2017 via Android
不用框架?
|
3
2ME Oct 19, 2017
关闭 session 试试?
|
4
thomasjiao Oct 19, 2017
关闭所有 middleware 和 service provider ;
路由缓存,配置缓存; |
5
silencefent Oct 19, 2017
/index.php
echo "hello world" |
6
lbp0200 Oct 19, 2017
没什么意义
|
7
FishInShallow Oct 19, 2017
不用它的模板引擎试试
|
8
z21victor Oct 19, 2017
这个是图啥,如果只输出,就不用框架呗
|
9
b821025551b Oct 19, 2017
毫无意义
|
10
wdlth Oct 19, 2017 via Android
难道用框架是为了输出 Hello World ?不用写业务逻辑?
|
11
HYSS Oct 19, 2017
不可能的 就算仅仅留下个 Kernel 还是会几十
|
12
yadgen OP @thomasjiao 没用,试过了。
|
14
TypeErrorNone Oct 19, 2017
还是把重点放到 mysql 上,php 这块到时开启 opcache 就行了,laravel 可以用 lumen 代替
|
15
yadgen OP @TypeErrorNone mysql 也简单,减少 IO,redis or memcache, 减少请求,在上游优化等等手段。
|
16
dryyun Oct 19, 2017
换个轻量级框架 ?
|
17
pqee Oct 19, 2017
14 年的 Laravel 4.2 默认配置 hello world 要 150 ms,该满足了。
如果你实在是想优化性能,换 PHP 效果最好。 |
18
pqee Oct 19, 2017
补充:换 PHP7 效果最好
|
19
gouchaoer Oct 19, 2017 via Android
opcache,session 存 redis/memcache,php7,没了
|
20
allenhu Oct 19, 2017 via Android
lumen 试试?
|
21
jfcherng Oct 19, 2017
還有 composer dump-autoload -o
|
22
jswh Oct 20, 2017
我猜你没开 opcache,之前也是。开了 opcache 之后框架启动时间就只有几到十几毫秒了
|
23
goodspb Oct 20, 2017
有个不错的思路,将框架常驻在内存,每次只是执行逻辑部分。
PS: 不过这个坑很多,公司用 laravel4.2 就这样跑过,稳定性稍差。 现成可参考的轮子有: https://github.com/scil/LaravelFly https://github.com/chongyi/swoole-laravel-framework https://github.com/garveen/laravoole |
24
songhuasahn Oct 20, 2017
原生好了
|