Subject: Re: bug#78520: 31.0.50; Performance issue in dired+isearch with dired-isearch-filenames

From: Juri Linkov <[email-masked]>
Date: Wed, 21 May 2025 09:20:43 +0300

> I have been using dired and isearch in a directory with ~8000 files and
> emacs became totally non-responsive. It freezed with every letter for
> ~10 seconds.
>
> I checked my config and it seems that the problem is
> `dired-isearch-filenames`. Any non-nil value produces this issue.

When you customize `dired-isearch-filenames` to non-nil, it uses
`next-single-property-change` to restrict matches to filenames.

> I ran with the profiler and it showed that all the time is going in
> `next-single-property-change`

You can make it twice as quick by removing the property
'dired-symlink-filename' from 'dired-isearch-search-filenames'.