You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use timers to identify slow[est] parts of vim-easytags
See also #80 where I suggested
to add accurate timing to the vim-easytags plug-in. Here it is :-). This
is still quite rudimentary but it's already an improvement over what was
there before!
Copy file name to clipboardExpand all lines: README.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,6 +265,23 @@ This option defines the pathname of the script that contains the Python implemen
265
265
266
266
## Troubleshooting
267
267
268
+
## vim-easytags is slow!
269
+
270
+
Yes, I know. I'm trying to make it faster but that's far from trivial. In the process of trying to speed up vim-easytags I've added reporting of elapsed time in several ways. If Vim seems very slow and you suspect this plug-in might be the one to blame, increase Vim's verbosity level:
271
+
272
+
:set vbs=1
273
+
274
+
Every time the plug-in executes it will time how long the execution takes and add the results to Vim's message history, which you can view by executing the [:messages][messages] command. If you want a more fine grained impression of the time spent by vim-easytags on various operations you can call the `xolox#easytags#why_so_slow()` function:
275
+
276
+
:call xolox#easytags#why_so_slow()
277
+
easytags.vim 3.6.4: Timings since you started Vim:
278
+
- 0.094937 seconds updating tags
279
+
- 1.850201 seconds highlighting tags
280
+
- 0.035167 seconds highlighting tags using ':syntax match')
281
+
- 0.493910 seconds highlighting tags using ':syntax keyword')
282
+
- 0.413160 seconds filtering tags for highlighting (stage 1)
283
+
- 0.141747 seconds filtering tags for highlighting (stage 2)
284
+
268
285
### `:HighlightTags` only works for the tags file created by `:UpdateTags`
269
286
270
287
If you want to create tags files and have their tags highlighted by the `easytags.vim` plug-in then you'll have to create the tags file with certain arguments to Exuberant Ctags:
@@ -299,12 +316,6 @@ Once or twice now in several years I've experienced Exuberant Ctags getting into
299
316
300
317
$ pkill -KILL ctags
301
318
302
-
If Vim seems very slow and you suspect this plug-in might be the one to blame, increase Vim's verbosity level:
303
-
304
-
:set vbs=1
305
-
306
-
Every time the plug-in executes it will time how long the execution takes and add the results to Vim's message history, which you can view by executing the [:messages][messages] command.
307
-
308
319
### Failed to highlight tags because pattern is too big!
309
320
310
321
If the `easytags.vim` plug-in fails to highlight your tags and the error message mentions that the pattern is too big, your tags file has grown too large for Vim to be able to highlight all tagged identifiers! I've had this happen to me with 50 KB patterns because I added most of the headers in `/usr/include/` to my tags file. Internally Vim raises the error [E339: Pattern too long][e339] and unfortunately the only way to avoid this problem once it occurs is to reduce the number of tagged identifiers...
0 commit comments