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

Very slow on save - 20-30 seconds #46

Closed
kaldrenon opened this issue Apr 29, 2014 · 4 comments
Closed

Very slow on save - 20-30 seconds #46

kaldrenon opened this issue Apr 29, 2014 · 4 comments

Comments

@kaldrenon
Copy link

For the past several weeks at least, I have found that saving vimwiki files can take up to 20-30 seconds (the UI is locked until the save completes).

I use a fair number of vimwiki plugins, so it's reasonably possible that vimwiki itself is not the source of the problem, but it seems to only happen when I save .wiki files.

Is this issue unique to me? Is it possible that the bug is with vimwiki?

How can I further diagnose the issue?

@EinfachToll
Copy link
Member

Do you use the last stable version of Vimwiki or the version from the dev branch? The stable version didn't change in the last few weeks. In the dev branch I added the automatic generation of the table of contents, but it is disabled by default and shouldn't take 20 seconds. So, check the values of g:vimwiki_auto_export and g:vimwiki_auto_toc.
For further inspectation, check which plugins set an autocommand that execute when you write a buffer: :au BufWrite, :au BufWritePre, :au BufWritePost, :au BufWriteCmd

@kaldrenon
Copy link
Author

I use Vundle to manage plugins. I do not remember exactly the last time I ran :BundleUpdate, but I am probably on the stable branch of vimwiki because I did not deliberately target the dev branch. I'm on vimwiki 2.1

g:vimwiki_auto_export and g:vimwiki_auto_toc are unset

I don't have any Buf* autocmds that run for vimwiki buffers.

Again, this may not be a problem that vimwiki itself is causing, but I'm really stumped for techniques to track down the cause. I want to benchmark/log the sequence of events when I save (a la vim --startuptime) but don't know how.

@EinfachToll
Copy link
Member

You can watch which functions of any Vim scripts are called by using profile: :profile start logfile and then :profile func *, which logs the execution of every called script function in the file "logfile".
But a probably easier approach is plugin bisecting: remove half of your plugins and see if the issue is still present. If no, the problematic plugin is among the ones you removed, if yes, it's in the other half. Continue until you found the problematic plugin.

@EinfachToll
Copy link
Member

Feel free to reopen if the issue persists.

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

2 participants