GNU bug report logs - #78520
31.0.50; Performance issue in dired+isearch with dired-isearch-filenames

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Tue, 20 May 2025 23:34:02 UTC

Severity: normal

Tags: fixed

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78520 <at> debbugs.gnu.org, spacibba <at> aol.com
Subject: bug#78520: 31.0.50; Performance issue in dired+isearch with dired-isearch-filenames
Date: Tue, 03 Jun 2025 18:25:33 +0300
> I did not face errors so far but... is it now really faster than before?
> I tried M-s f C-s in a huge dired buffer in emacs -Q, and it was
> horribly slow.  Slower than with the hack I had been using.  I did not
> yet try to have a closer look at your code I must admit.  Did you see a
> speed improvement?

I'm using C-s in large Dired buffers all the time, and before the patch
the search lags were too long (~2 sec on every match).  But now with
the patch the search is instantaneous even on very large Dired buffers.

The search might be still slow only on one very rare case:
when the search string also occurs outside of file names.
For example, when the Dired contains permissions "-rw-r--r--",
then searching for "r" or "rw" will be slow.

Do we need more optimization for such rare cases?

This is possible to do by adding the same code that you suggested
not only before the 'while' loop, but also at the end of every
iteration inside the 'while' loop.  But this will overcomplicate
the function 'search-within-boundaries'.




This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.