Slow vagrant box, how to improve this?

前端 未结 7 913
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 05:21

We\'ve built a vagrant box for our development box and we are facing some latency issues.

Issues:

  • Assetic:watch is being slow
  • Ove
7条回答
  •  后悔当初
    2021-02-06 05:49

    You need also to don't share vendor folder between host and vagrant, if you are doing that. Because reading of shared files are slow. Take look at this link. In order to do that you will need to change composer.json file inside you symfony2 project :

    "config": {
      ...,
      "vendor-dir": "/some_new_location/vendor"
    },
    

    and also change app/autoload.php.

    $loader = require '/some_new_location/vendor/autoload.php';
    

    After doing that run composer install.

    There are also some resources for reading :

    1. http://www.erikaheidi.com/blog/optimizing-symfony-applications-on-vagrant-boxes/
    2. http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html
    3. Symfony2 Slow Initialization Time

提交回复
热议问题