I have a VMware virtual machine with Debian Squeeze. All of my projects are located in a folder on my Windows machine, accessible to the Debian virtual machine through the VMware shared folder. This means that I can work on my projects using the correct text editor on my Windows machine, placing them in a linux environment. I have been using this setup for several months without having problems hosting Apache sites with PHP or other development related tasks until I tried Symfony .
Now I have one instance of the finished Symfony 2 demo ( Symfony_Standard_Vendors_2.2.1.tgz ) in my htdocs directory, as well as one on my Windows machine shared with VM. My htdocs directory looks like this:
htdocs |`- Symfony `- Symfony_shared -> /mnt/hgfs/Dropbox/Symfony
Symfony is the actual physical directory located in the htdocs folder, and Symfony_shared is a soft link to the Dropbox folder on my Windows machine. I have to repeat; I have never had a performance problem before.
Same file system
Now - when I visit http: //devmachine.local/Symfony/web/app_dev.php in the browser and go to the profiler, I see these numbers:
Total time 83 ms
Initialization time 43 ms
Very good numbers. The entire response was ready in less than 100 ms.
Linked
But when I visit http: //devmachine.local/Symfony_shared/app_dev.php , I see very different numbers in the profiler:
Total time 6833 ms
Initialization time 4249 ms
Can someone explain these numbers? What is “Initialization Time” and how does it take more than 4 seconds? Keep in mind that this is just a symfony welcome page. The login page for my actual test project has an initialization time of 19 seconds, the total time is 22 seconds.
I should mention, I also performed a quick test with running php app/console in both directories. In the Symfony folder, this command immediately returned usage, and in Symfony_shared, it took a few seconds before replying.
The only change I made to the Symfony folders was the removal of the app_dev.php part, which limits the traffic to 127.0.0.1.
I am using Apache 2.4.4 and PHP 5.4.14 on Debian 6.0.7 (compression).
Here is a screenshot of the symfony_shared welcome page profiler:
