]> git.eshelyaron.com Git - emacs.git/commit
Use 'regexp-opt' in 'dired-omit-regexp'
authorSpencer Baugh <sbaugh@catern.com>
Sat, 16 Mar 2024 17:11:24 +0000 (17:11 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:21:19 +0000 (15:21 +0100)
commit33113b95e26b795f338055c253768dda6276db29
tree43a895b773a6b5f9626898f5704b1fb7b14d9f47
parent908fa2e82d50d9de8c3edf436d9d3f7763e4b8ee
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.

(cherry picked from commit abc2d39e0102f8bb554d89da3c0ffe57188220ff)
doc/misc/dired-x.texi
etc/NEWS
lisp/dired-x.el