Slow vagrant box, how to improve this?

前端 未结 7 918
没有蜡笔的小新
没有蜡笔的小新 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 06:10

    When you use NFS its very slow to create a lot of files in a shared directory. As a workaround - Change your vagrant vendor folder to a non shared folder

    "config": {
      "bin-dir": "bin",
      "secure-http" : false,
      "vendor-dir" : "/vendor"
    },
    

    - Create a symlink in your application folder as some sections of build process might be referring to vendor/bin directory via a relative link

    project-dir$ sudo ln -s /vendor vendor
    
    • Do composer install, this will be a lot faster

    • Zip /vendor folder and copy zip into NFS shared project folder

    • Extract the zip via your host machine
    • Run composer install again to make sure its not downloading files again

提交回复
热议问题