diff options
| author | Spencer Baugh | 2024-03-16 17:11:24 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2024-03-23 19:07:49 +0200 |
| commit | abc2d39e0102f8bb554d89da3c0ffe57188220ff (patch) | |
| tree | 46e800583c4356def8ca045b459b2206a059f55d /doc/misc | |
| parent | 8d7a3ed3495968fd3e95a6126e7c23e25b7c495f (diff) | |
| download | emacs-abc2d39e0102f8bb554d89da3c0ffe57188220ff.tar.gz emacs-abc2d39e0102f8bb554d89da3c0ffe57188220ff.zip | |
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/misc')
| -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 | |||
| 346 | match the file name relative to the buffer's top-level directory. | 346 | match the file name relative to the buffer's top-level directory. |
| 347 | @end defvar | 347 | @end defvar |
| 348 | 348 | ||
| 349 | @defvar dired-omit-size-limit | ||
| 350 | If non-@code{nil}, @code{dired-omit-mode} will be effectively disabled | ||
| 351 | in directories whose listing has size (in bytes) larger than the value | ||
| 352 | of this option. Since omitting can be slow for very large directories, | ||
| 353 | this avoids having to wait before seeing the directory. This variable | ||
| 354 | is ignored when @code{dired-omit-mode} is called interactively, such as | ||
| 355 | by @code{C-x M-o}, so you can still enable omitting in the directory | ||
| 356 | after the initial display. | ||
| 357 | |||
| 349 | @cindex omitting additional files | 358 | @cindex omitting additional files |
| 350 | @defvar dired-omit-marker-char | 359 | @defvar dired-omit-marker-char |
| 351 | Temporary marker used by Dired to implement omitting. Should never be used | 360 | Temporary marker used by Dired to implement omitting. Should never be used |