doulongdan2264 2015-05-21 14:00
浏览 34

Symfony2 - 添加捆绑包时的初始化时间较慢

I noticed a big slow performance issue after installing the NelmioApiDocBundle (before: ~250ms, after: ~1800ms), the initialization time has increased significantly.

I disabled xDebug, I'm on a up-to-date Vagrant machine (debian) with NFS on PHP 5.6 with OPCache enabled and I'm on OS X host machine. I tried to move the logs/cache folders into /dev/shm, but without any change.

I also noticed that when I switch off the debug mode, the slow issue disappears. So I change the isFresh method of the FileResource class (see code) to return always true without checking the filemtime and the performance issue is partially gone (~450 ms).

So, why filemtime takes so long ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?