Symfony2 application is very slow when you run it with default settings on Vagrant/Windows.
What one can do about it?
The best solution that I have found so far is to move vendor/
outside shared folder.
It doesn't require nfs and can be done easily with two simple changes.
One change in composer.json
:
//filename: composer.json
{
...
"config": {
"bin-dir": "bin",
"vendor-dir": "/home/vagrant/symfony2app/vendor"
},
...
}
and one change in app/autoload.php
:
//filename: app/autoload.php
/**
* @var ClassLoader $loader
*/
$loader = require '/home/vagrant/symfony2app/vendor/autoload.php';
The results are truly amazing. Esspecially on Windows.
More details here: http://by-examples.net/2014/12/09/symfony2-on-vagrant.html
来源:https://stackoverflow.com/questions/27399604/how-to-run-symfony2-application-on-vagrant-without-nfs-on-windows-for-example