[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12867: 24.3.50; easy-to-repro crash involving mode line
From: |
Eli Zaretskii |
Subject: |
bug#12867: 24.3.50; easy-to-repro crash involving mode line |
Date: |
Mon, 12 Nov 2012 20:19:01 +0200 |
> Date: Mon, 12 Nov 2012 18:31:53 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: Drew Adams <drew.adams@oracle.com>, 12867@debbugs.gnu.org
>
> > The need to redisplay the mode line on every move of point is a killer
> > of many redisplay optimizations. It is also potentially expensive by
> > itself, because it requires Emacs to count lines, something that is
> > not an easy operation in Emacs, which sees the buffer text as a linear
> > array of characters, not a series of lines. So the display engine
> > tries very hard to avoid redisplaying the mode line if it decides that
> > the line number does not need to appear.
>
> I think it would make sense to use a cache for maintaining line numbers.
We already do, but maybe not as extensively as you may have in mind.
See the base_line_pos member of 'struct window'.
There's also region-cache.c, which we could use for that. But before
we do, Someone(TM) should time the thing and see if it's worth our
while to make that cache.
bug#12867: 24.3.50; easy-to-repro crash involving mode line, martin rudalics, 2012/11/12