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 ?