php - Why is Symfony 2 responding EXTREMELY slowly in my environment? -


i have vmware virtual machine running debian squeeze. projects in folder on windows machine, accessible debian vm via vmware shared folder. means can work on projects using proper text editor on windows machine while hosting them linux environment. i've been using setup months, having no problems hosting apache sites php or other development related tasks, until tried out symfony.

i have 1 instance of out-of-the-box demo of symfony 2 (symfony_standard_vendors_2.2.1.tgz) in htdocs directory, 1 on windows machine, shared vm. htdocs directory looks this:

htdocs |`- symfony  `- symfony_shared -> /mnt/hgfs/dropbox/symfony 

symfony actual physical directory sitting in htdocs folder, while symfony_shared soft link dropbox folder on windows machine. must repeat; have never had performance issues approach before.

same file system

now - when visit http://devmachine.local/symfony/web/app_dev.php in browser , proceed profiler, see these numbers:

total time           83 ms initialization time  43 ms

very nice numbers. entire response ready in less 100 ms.

linked

but when visit http://devmachine.local/symfony_shared/app_dev.php see different numbers in profiler:

total time           6833 ms initialization time  4249 ms

can explain these numbers? "initialization time" , how come takes more 4 seconds? keep in mind symfony demo welcome page. login page in actual test project has initialization time of 19 seconds, total time being 22 seconds.

i should mention, did quick test running php app/console in both directories. in symfony folder, command returned usage immediately, while in symfony_shared took few seconds before responding.

the change i've made symfony folders removing portion of app_dev.php limits traffic 127.0.0.1.


i'm using apache 2.4.4 , php 5.4.14 on debian 6.0.7 (squeeze).

here screenshot of symfony_shared welcome page profiler:

screenshot of symfony_shared welcome page profiler

check php configuration open_basedir restrictions preventing stat cache working. symfony makes lot of fstat() calls , if aren't cached symfony extremely slow. it's possible symlink preventing stat cache working. if profile app (and include native php functions), pretty obvious if it's fstat() that's causing issues.

there's information @ php bug #49383.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -