From 83e8cf33e0293707809d183f32d753edf5849033 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sat, 19 Jul 2014 13:48:53 +0200 Subject: Use timers to identify slow[est] parts of vim-easytags See also https://github.com/xolox/vim-easytags/pull/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! --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5b4640a..978b56a 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,23 @@ This option defines the pathname of the script that contains the Python implemen ## Troubleshooting +## vim-easytags is slow! + +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: + + :set vbs=1 + +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: + + :call xolox#easytags#why_so_slow() + easytags.vim 3.6.4: Timings since you started Vim: + - 0.094937 seconds updating tags + - 1.850201 seconds highlighting tags + - 0.035167 seconds highlighting tags using ':syntax match') + - 0.493910 seconds highlighting tags using ':syntax keyword') + - 0.413160 seconds filtering tags for highlighting (stage 1) + - 0.141747 seconds filtering tags for highlighting (stage 2) + ### `:HighlightTags` only works for the tags file created by `:UpdateTags` 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 $ pkill -KILL ctags -If Vim seems very slow and you suspect this plug-in might be the one to blame, increase Vim's verbosity level: - - :set vbs=1 - -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. - ### Failed to highlight tags because pattern is too big! 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... -- cgit v1.2.3