diff options
author | Spencer Baugh <sbaugh@catern.com> | 2024-03-16 17:11:24 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-03-23 19:07:49 +0200 |
commit | abc2d39e0102f8bb554d89da3c0ffe57188220ff (patch) | |
tree | 46e800583c4356def8ca045b459b2206a059f55d /doc | |
parent | 8d7a3ed3495968fd3e95a6126e7c23e25b7c495f (diff) | |
download | emacs-abc2d39e0102f8bb554d89da3c0ffe57188220ff.tar.gz |
Use 'regexp-opt' in 'dired-omit-regexp'
In my benchmarking, for large dired buffers, using 'regexp-opt'
provides around a 3x speedup in omitting.
'regexp-opt' takes around 5 milliseconds, so to avoid slowing
down omitting in small dired buffers we cache the return value.
Since omitting is now 3x faster, increase 'dired-omit-size-limit'
by 3x. Also, document 'dired-omit-size-limit' better.
* doc/misc/dired-x.texi (Omitting Variables): Document
'dired-omit-size-limit'.
* etc/NEWS: Announce increase of 'dired-omit-size-limit'.
* lisp/dired-x.el (dired-omit--extension-regexp-cache): Add.
(dired-omit-regexp): Use 'regexp-opt'. (Bug#69775)
(dired-omit-size-limit): Increase and improve docs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/misc/dired-x.texi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 4cad016a0f6..726b6653d0d 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -346,6 +346,15 @@ only match against the non-directory part of the file name. Set it to match the file name relative to the buffer's top-level directory. @end defvar +@defvar dired-omit-size-limit +If non-@code{nil}, @code{dired-omit-mode} will be effectively disabled +in directories whose listing has size (in bytes) larger than the value +of this option. Since omitting can be slow for very large directories, +this avoids having to wait before seeing the directory. This variable +is ignored when @code{dired-omit-mode} is called interactively, such as +by @code{C-x M-o}, so you can still enable omitting in the directory +after the initial display. + @cindex omitting additional files @defvar dired-omit-marker-char Temporary marker used by Dired to implement omitting. Should never be used |