-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Tagbar is making Vim's cursor lag #107
Comments
Hm, that doesn't really look like Tagbar or EasyTags are responsible. The timings are all in the millisecond range, and the functions only got called a few times. I don't use EasyTags, but Tagbar doesn't do anything while you're typing, it only updates after a |
Yes, but the only action I did was moving the cursor down three lines... And disabling both plugins solves the problem. |
What happens if you only disable one of them? Also, how exactly does this slowness manifest itself? What does |
Vim becomes slow after a few minutes, especially when I have a few files opened in different tabs + split, and with big files. It manifests itself with annoyingly slow cursor movement, and any other action is slow (in particular editing). I'll try disabling only one of them, thanks for your help! |
The |
But what about the slowness? Does it only happen with one of the plugins? |
I'm experiencing a similar problem, except that I see the slowdown immediately under the right conditions. I haven't yet determined whether the problem is due to file size (I see the slowdown on a 13k-line C file and a 6600 line Python file) or because each of those files contain really big arrays (thousands of lines). In any case, the slowdown becomes more pronounced the further into the file I move the cursor. So when I open one of the target files and move around the first few lines, everything is normal. If I jump to the end of the file, cursor motion becomes very sluggish. If I jump back to the beginning, the cursor moves normally again. The problem appears to be a conflict between tagbar and powerline. If I disable all my plugins except tagbar, I don't see a slowdown. If I disable everything but powerline, I also don't see a slowdown. If I have both tagbar and powerline enabled (even if those are the only two), I see the slowdown. I see the same behavior whether or not I have the 'currenttag' segment installed. I'm still poking at it to see what exactly is causing the problem. |
@majutsushi the slowness does not happen when I disable EasyTags. I disabled EasyTags. Also, using the latest version of MacVim on Mountain Lion resulted in a noticeable boost. |
I'm seeing pretty consistent behavior in gvim 7.3 on Windows and Linux, and vim 7.3 in cygwin. |
After some further testing, I'm thinking it's filesize related. The issue manifests when viewing /usr/include/xcb/xproto.h, which is 446k (15324 lines) on my Ubuntu 10.04 test system. The file is fairly large, but it's made up of fairly small data structures. Vim requires multiple seconds to initialize when opening the file, and movement becomes exceedingly sluggish as the cursor nears the end of the file. The problem is most visible (well, aside from the slow startup) when trying to scroll quickly in any direction by holding down a key. As before, disabling either powerline or tagbar makes the problem go away. |
Yes, large files can lead to noticeable delays. There is unfortunately not much I can do about that, some of the problems have to do with the work that Tagbar has to do to properly parse the tags, and others with the speed of Vim's native functions. The most complicated thing that Tagbar has to do when parsing the ctags output is to figure out the correct scope of the tags. For this it has to call the The sluggishness at the end of the |
Easytags turned out to be a huge tax on my system. I disabled it, and now my MacVim instances are lightening fast!!! |
It reading through the history here it sounds to me like EasyTags was the culprit. Enough time has passed that it might have been fixed. In any case I don't see a current issue that needs addressing in this plugin. If I'm wrong about that please feel free to comment here and I'm happy to re-open this and look into it. The other performance related issue that I'll crosslink here in case people find this on search is #494, which has to do with the lag between buffer changes and tagbar updates. Different issue, but seems to be a common point of confusion. |
@alerque Did you try with |
@bam80 This comment already details pretty much what can and can't be done about the edge case seen in |
Hi,
After a few minutes of use, my Vim is getting very slow, even when something as simple as moving the cursor.
I profiled the running function and got this result:
So apparently TagBar and EasyTags are causing most of the lag.
Any Python file will make Vim slow, especially big ones. My vim dotfiles are here: https://github.com/charlax/dotvim
I did not change
updatetime
.Thanks for your help!
The text was updated successfully, but these errors were encountered: