p0deje / vagrant-exec

Execute commands in Vagrant synced folder
MIT License
140 stars 6 forks source link

Make vagrant-exec blazing fast #7

Closed p0deje closed 10 years ago

p0deje commented 10 years ago

Idea was to set up shared SSH connection (via ControlPath), but it doesn't help much.

$ time vagrant exec pwd # plain
2.53 real
$ time vagrant exec pwd # using plain OpenSSH instead of Vagrant API to execute command and shared connection
1.53 real

This is still very slow, because if we avoid Vagrant, we can reduce time to 0.01.

Looks like the only way to do this will be to implement binstubs for commands which will connect to VM using OpenSSH with pre-saved vagrant ssh-config. This however leads to a number of new problems: how to regenerate config when Vagrantfile is changed, how to regenerate config if VM port (or IP) has changed, etc.

p0deje commented 10 years ago

Implemented with binstubs in 0.5.0