When working on huge files, it seems that when hide-show collapses a large multi-line block, linum still creates hidden overlays for every line in the hidden block leading to unresponsive emacs. Is there a way to fix linum?
To reproduce: Create a new file, enable c-mode, hs-minor-mode and linum-mode,
create a huge block by typing: { C-u 10000 RET }
then execute hs-hide-all and watch Emacs become unresponsive.
nlinumpackage from GNU ELPA. Does that work better for you? – phils Feb 08 '17 at 17:58linum.el, but nobody really cares (except me). For starters, it can be restricted to only the visible window -- requiring a modification of the C source code to be efficient so thatwindow-startandwindow-endvalues are always accurate [ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22404 ]. Second, theline-number-at-poscan be replaced with(format-mode-line "%l")[with some exceptions http://emacs.stackexchange.com/questions/3821/a-faster-method-to-obtain-line-number-at-pos-in-large-buffers ]. Third, it can be written to exclude invisible lines. – lawlist Feb 08 '17 at 18:54