-
Notifications
You must be signed in to change notification settings - Fork 70
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
Huge delay added to switching tabs #47
Comments
Just to make sure, debug mode is turned off in your When
Yes, that would improve performance. |
Yea it is disabled. |
Ok, I'll update the plugin to use the new async api if available. |
Instead of using async, I've buffered the heartbeats in memory. Can you update the plugin and see if performance improves when switching tabs? If it's improved enough, we can postpone using the async |
Vim seems a lot snappier now compared to before. Huge thanks :) |
Awesome! Glad it's fixed! |
It would seem that Vim no longer reports any time to wakatime. I have zero time registered from the day this issue was solved up to now. |
How about with the latest version? |
Yes, latest version solves the issue. I was looking through the log and it is filled with these errors (that are no longer happening). In case you would find it useful anyway:
|
That was the same issue as #48. I can write a script to parse your |
Oh my bad. No that wont be needed but thanks anyway :) |
An update, now vim-wakatime uses Vim's async It also buffers heartbeats to prevent spawning too many python processes. |
I'm using lots of tabs with many windows when I'm coding and when I added this plugin to my Vim the performance really tanked. From taking a couple milliseconds between tab switches it now takes around 0.5+ everytime I switch tab in Vim.
My guess is that this line is the cause:
autocmd BufEnter * call s:handleActivity(s:false)
found here: https://github.com/wakatime/vim-wakatime/blob/master/plugin/wakatime.vim#L312Does it really have to call this method every single time on every single buffer in the tab I switch to?
Could this be refactored to use the new async API that has been implemented in the latest Vim or NeoVim?
The text was updated successfully, but these errors were encountered: