I have a VMware virtual machine running Debian Squeeze. All my projects are in a folder on my Windows machine, accessible to the Debian VM via a VMware shared folder. This means that I can work on my projects using a proper text editor on my Windows machine while hosting them from a linux environment. I've been using this setup for months, having no problems hosting Apache sites with PHP or other development related tasks, until I tried out Symfony.
I now have one instance of the out-of-the-box demo of Symfony 2 (Symfony_Standard_Vendors_2.2.1.tgz) in my htdocs directory, as well as one on my Windows machine, shared with the VM. My htdocs directory looks like this:
htdocs
|`- Symfony
`- Symfony_shared -> /mnt/hgfs/Dropbox/Symfony
Symfony is an actual physical directory sitting in the htdocs folder, while Symfony_shared is a soft link to the Dropbox folder on my Windows machine. I must repeat; I have never had any performance issues with this approach before.
Same file system
Now - when I visit http://devmachine.local/Symfony/web/app_dev.php in the browser and proceed to the profiler, I see these numbers:
Total time 83 ms Initialization time 43 ms
Very nice 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 anybody explain these numbers? What is the "Initialization time" and how come it takes more than 4 seconds? Keep in mind this is just the Symfony demo welcome page. The login page in my actual test project has an initialization time of 19 seconds, the total time being 22 seconds.
I should mention, I also did a quick test running php app/console
in both directories. In the Symfony folder, this command returned the usage immediately, while in Symfony_shared it took a few seconds before responding.
The only change I've made to the Symfony folders is removing the portion of app_dev.php that limits traffic to 127.0.0.1.
I'm using Apache 2.4.4 and PHP 5.4.14 on Debian 6.0.7 (squeeze).
Here is a screenshot of the Symfony_shared welcome page profiler:
config.php
you get no warning? – Gyve