How to use a profiler in PHP to see which files are being loaded

217 Views Asked by At

I'm in the process of optimizing a Drupal application.

The webserver root is on an NFS share, but I have opcode caching enabled, and so in theory all the php pages should be loaded into memory and I shouldn't experience any overhead with NFS.

In benchmarks, however, loading a PHP page off of NFS is 25% slower than off of a local disk.

Is there any way to see which files are being loaded by PHP, and whether these are being stored in APC?

I've profiled the site with xhprof, but it doesn't seem to supply any information about what files are being loaded.

Once I figure out where the file bottleneck is, I hope to be able to optimize it with some more aggressive caching.

Thanks!

2

There are 2 best solutions below

0
On

Might xdebug be of any help here? I've not used it for exactly what you are looking for ("which files are being loaded by PHP") but have used it for profiling in general, so not unlike xhprof

0
On

You might check out PHP Quick Profiler as well, haven't used it in some time though, but it gives you good information and load times on includes, which may be handy for you.