Grunt on virtualbox is extremely slow when editing files from shared folder's host machine

0

My setup consists of a virtualbox running Linux Mint 16 Mate as the guest and Windows 7 as my host. I am running bridged network types although this problem occurs on any network type I choose. I am sharing my host's files using "virtualbox shared folders" and mounting on the guest (linux machine) so that I may edit files using my host. It all works. Here's my problem:

Grunt is installed on the guest machine (along with the lamp stack, etc). However, I am getting extremely slow grunt times for such simple things as a background image change. I am averaging 9-10 seconds just for simple css edits :/ I only have 2 Grunt tasks running - Stylus compiling and browser refresh.

Is there anything I can do to speed up this painfully slow response time? I have installed the Jit-Grunt plugin, but that doesn't seem to have sped anything up. Do I need to share folders using CIFS instead? I do not know much about CIFS if so (very new to all this).

Thank you for your time and knowledge.

n0sleeves

Posted 2014-03-29T16:47:52.480

Reputation: 71

Answers

0

It appears that using a combo of the "host-only" networking type and samba / cifs helped a lot. I am now getting 3 seconds delay instead of double digits.

However, I would still love to know what everyone else is using and the results they are getting.

n0sleeves

Posted 2014-03-29T16:47:52.480

Reputation: 71

Did you find a way to improve upon this? – neojp – 2014-04-24T21:19:10.340

No :( I am actually getting double digit edit times again for some reason for such simple site edits. I am experiencing the same results as if I was sharing using the "virtual box shared folders". What about you? – n0sleeves – 2014-05-08T06:20:13.260

1

Found this info here: https://github.com/gruntjs/grunt-contrib-watch/issues/69. I ended up trying it and it seems to have cut load time down significantly.

By default this watch task will spawn task runs as child processes. For some systems, especially on Windows it can be really slow. Set the option: nospawn: true.

https://github.com/gruntjs/grunt-contrib-watch#optionsnospawn https://github.com/gruntjs/grunt-contrib-watch#why-spawn-as-child-processes-as-a-default

– n0sleeves – 2014-05-10T19:16:12.253