cmake.vim
cmake.vim copied to clipboard
Slow Starts within NeoVim on :VimEnter
Under Neovim, cmake.vim doesn't take advantage of the async job-control
functionality thus making it take the whole program's start time a bit longer.
This originated at https://github.com/neovim/neovim/issues/2888.
@languitar's thoughts were correct; it's a caching job that's done to pre-emptively load all of the information about CMake. CMake doesn't have a querying system for that (assumes that you'd only be using the generated build tool-chain).
That said, @languitar, what version of the plugin are you using? The plug-in shouldn't do any caching at all if it's in your home directory (since it shouldn't find a CMakeCache.txt
file at $HOME).
Just re-read old issue; you're using latest. I'll start looking into using jobcontrol and see how I can incorporate that into cmake.vim
great to hear.
If caching shouldn't happen, any way to find out what is actually wasting my start time?
I've taken some time to look into this and I'm debating actually disabling caching and making it something the user has to explicitly do if they request it (via an option). I also debated persisting the cache into disk after the first time and having it be updated occasionally.
I can also avoid this by forcing users to use the JSON compilation information as a basis for info but I'm afraid that that'll couple a dependency like Ruby or Python into Vim and I wanted to avoid that.
Okay so I had to take some time to really understand neovim (ended up moving to it) and now I think I might end up doing one of the following:
- implement a remote plug-in: This would allow for you to just code and let cmake.vim update when new changes come into play.
- take advantage of job control: This would be a lot easier to have for backwards compatibility, in terms of implementation.