Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim hangs on saving when the package is large #356

Closed
typeless opened this issue Mar 13, 2015 · 6 comments
Closed

Vim hangs on saving when the package is large #356

typeless opened this issue Mar 13, 2015 · 6 comments

Comments

@typeless
Copy link

Every time I edit a file in the Go toolchain like /src/cmd/internal/gc/lex.go, it hangs for seconds on saving the file and keeps consuming 100% CPU at the same time. I can find the program 6g working hard in the background by using the 'top' command. The problem happens on both Ubuntu (I forget the version and I can't reach it right now) and MacOSX 10.10.2.

:let g:go_fmt_autosave=0 doesn't fix the problem as I expected. I would like to know what other actions would be taken on file saving.

@fatih
Copy link
Owner

fatih commented Mar 13, 2015

Are you using any other vim plugins, such as syntastic ? They are compiling the files on every save which causes this. Otherwise vim-go doesn't call anything once you disable it. Other problems might be syntax highlighting (try to disable them) and don't use goimports which is very slow on large GOPATH directories.

@typeless
Copy link
Author

Yes, I do.
After removing syntastic from my .vim/bundle, the problem disappears.
Please close the issue.
Thanks alot.

@fatih
Copy link
Owner

fatih commented Mar 13, 2015

You're welcome :)

@fatih fatih closed this as completed Mar 13, 2015
@dpetersen
Copy link
Contributor

If anyone else ends up here like I did, I had the same problem and added a shortcut for SyntasticToggleMode that I use on my projects with longer compile times. In "passive" mode, Syntastic will still do a basic syntax check, and anything blatantly wrong will be flagged as an error. It's fast and it's better than nothing.

@benmoss
Copy link

benmoss commented Mar 1, 2018

Also had this same problem with https://github.com/roxma/nvim-completion-manager, wasn't only on saves, it was everytime I opened files.

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 1, 2018

I suspect this may be due to gocode. Can you give #1697 a try to see if it mitigates the hangs when opening files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants