tomtom/tlib_vim

tmru slow when tlib used filename indicators (old code, just informal)

blueyed opened this issue · 0 comments

I have just noticed tmru being slow when opening.

The profiling shows this (from tlib):

 501              0.003006         let use_indicators = g:tlib_inputlist_filename_indicators || has_key(self, 'filename_indicators')
                                    " TLogVAR use_indicators
  501              0.000789         if use_indicators
  501              0.002611             call insert(marker, '[')
  501              9.686390             let bnr = bufnr(a:file)
                                        " TLogVAR a:file, bnr, self.bufnr
  501              0.001861             if bnr != -1
   38              0.000111                 if bnr == self.bufnr
    2              0.000013                     call add(marker, '%')
    2              0.000003                 else

I was using an older version of tmru and tlib.

Just updated tmru from 7122f8d..f9e5acd and tlib from 12789a0..6c4821a afterwards.

Both changed the code around filename indicators, so this might be void.

Its quite odd though, that one Vim instance was slow, while another one wasn't. Maybe something to keep in mind - that bufnr() could be extremely slow.

Feel free to close this issue, just wanted to inform you.