leoliu / ggtags

Emacs frontend to GNU Global source code tagging system.
http://elpa.gnu.org
578 stars 57 forks source link

Cache number of lines from previous output in `ggtags-global-output` #183

Closed nnicandro closed 6 years ago

nnicandro commented 6 years ago

line-number-at-pos grows linearly with the number of lines in a buffer so cache the computation of the number of lines and only call line-number-at-pos when the buffer is narrowed to new output produced by Global that has not been processed yet.

leoliu commented 6 years ago

It is probably better to use count-lines directly. what do you think?

nnicandro commented 6 years ago

That is indeed better.