bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14786: 24.3.50; `field-end' is now very slow


From: Eli Zaretskii
Subject: bug#14786: 24.3.50; `field-end' is now very slow
Date: Fri, 05 Jul 2013 19:01:17 +0300

> Date: Thu, 4 Jul 2013 13:57:52 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 14786@debbugs.gnu.org
> 
> 1. emacs -Q
> 
> 2. Load library dired-details.el, from Emacs Wiki:
> http://www.emacswiki.org/emacs/download/dired-details.el
> 
> 3. C-x d ; in some directory that has lots of files
> 
> 4.  M-x dired-details-toggle
> 
> 5. M-x dired-details-toggle ; (optional, so you see all info)
> 
> 6. Position the cursor on a file or dir name near the beginning of
> the list.
> 
> 7. M-: (field-end nil)
> 
> The result appears after a few seconds (I'm guessing about 4 sec
> in the directory I used).
> 
> Do the same thing in previous Emacs versions (including as recent
> as 24.3, at least), and the result appears immediately.

Not exactly immediately, but approximately 4 to 5 times faster.

The problem is that dired-details floods the Dired buffer with
overlays.  When there are so many overlays, searching for an end of a
non-existent property takes a lot of time, because Emacs needs to
examine every overlay in the buffer.

What happened between Emacs 24.3 and the current trunk is that the
call

    GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0);

in get_char_property_and_overlay got roughly 4 to 5 times slower.  I
don't know why this slowdown happened, but it just moved the time
needed by field-end from below the annoyance threshold to well above
it.

If someone can find out why GET_OVERLAYS_AT is now slower, we could
see if that could be fixed.  But it's quite possible that the change
which caused that fixed some bug that we don't want to re-introduce.
In any case, I think having so many overlays in a buffer is asking for
trouble.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]