hashivim/vim-terraform

:wq (save and quit) takes 5 seconds when vim-terraform is loaded

wwalker opened this issue · 5 comments

when vim-terraform and juliosueiras/vim-terraform-completion are both loaded, :wq on a 1.5 KB file takes 5 full seconds for vim to exit.

It only takes 3 ms to write the file:

3259028 16:25:03.738451 openat(AT_FDCWD, "4:dhcp_options.tf", O_WRONLY|O_CREAT, 0644) = 5
3259028 16:25:03.741233 close(5)        = 0

After which it calls open() on *514* files with terraform in the name.

If I only vim-terraform or vim-terraform-completion, :wq is instant.

Sorry, but I'm afraid you're probably going to have to figure this one out for yourself. I don't use vim-terraform-completion, and have no idea how these plugins might be interacting to give this effect.

If you do figure it out and if you think that this plugin is at fault, am certainly open to fixing - MRs welcome.

Gonna close this - I think it's unlikely that this plugin is at fault and I'm not intending to take any action; so it's not really doing any good.

If you do make progress on understanding the problem please feel free to update here, perhaps the next person will benefit.

And if you do find reason to think that this plugin is doing something wrong, please feel free to open a new issue - or even better submit an MR: if there is something here that wants fixing, let's fix it.

@wwalker did you find a solution? I happen to be having the same issue!

@serpa-dystematic You might have more luck asking about this on the completion plugin's repo, since it references this plugin as one of several dependencies.

@serpa-dystematic No, I didn't. I just removed terraform completion.