【问题标题】:Vagrant rsync is super slowVagrant rsync 超级慢
【发布时间】:2016-06-28 17:51:03
【问题描述】:

我在 vagrantfile 中有这个:

config.vm.synced_folder ".", "/vagrant",
type: "rsync", rsync__auto: true, rsync__exclude: [".git/", "django/"]

+ 我在单独的标签中运行vagrant rsync-auto

对文件进行更改后,vagrant 大约需要 5 秒才能将其拾取并 rsync。

无论如何要加快速度?我将它用于 webpack/hot-module-reloading。

【问题讨论】:

    标签: vagrant rsync


    【解决方案1】:

    有一个稍微过时的插件,名为vagrant-gatling-rsync,旨在解决这种情况。

    https://github.com/smerrill/vagrant-gatling-rsync

    你应该可以使用安装它

    $ vagrant plugin install vagrant-gatling-rsync
    

    然后,您可以(可选)将其添加到您的 Vagrantfile:

    config.gatling.rsync_on_startup = true
    

    上面的行不再需要了,因为这是插件的默认行为。

    您应该能够通过将现有的$ vagrant rsync-auto 命令替换为插件中的匹配命令来触发此功能:

    $ vagrant gatling-rsync-auto
    

    根据我的个人经验,自版本 1.9.0 左右以来,我没有发现 Vagrant rsync 的内置版本有任何问题,但这可能对您的情况有所帮助。

    【讨论】:

      猜你喜欢
      • 2015-07-26
      • 2015-01-08
      • 1970-01-01
      • 2021-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多