GNU bug report logs -
#27427
26.0.50; Native line numbers lead to display error in company-mode popup
Previous Next
Reported by: Alexander Miller <alexanderm <at> web.de>
Date: Mon, 19 Jun 2017 16:51:02 UTC
Severity: normal
Found in version 26.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #119 received at 27427 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 25 Jun 2017 17:59:01 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: alexanderm <at> web.de, 27427 <at> debbugs.gnu.org
>
> I also voted for a line numbers cache like that of (or even in
> combination with) the 'syntax-ppss' cache but that's a different
> subject.
For the record, IME caches are problematic in the display code.
Various display routines are invoked from semi-random places,
sometimes utterly unrelated to display per se. As a typical example,
consider vertical-motion.
Also, redisplay optimizations many time perform layout only for small
portions of the window/frame, so you cannot easily rely on the fact
that you will be called for a significant number of screen lines,
something which would favor caching.
Last, but definitely not least, caching gets in the way when the
display engine decides it should abandon some layout attempt, back up,
and continue from some previous state of the layout process. Many
times, this requires to reset the cache as well, which complicates
management.
So my advice is always to try to code efficient algorithms that can
perform reasonably fast without caching. It turned out that counting
line (using the same code we always used for line-number display in
the mode line) is just such a fast method.
This bug report was last modified 7 years and 314 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.