bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69775: [PATCH] Use regexp-opt in dired-omit-regexp


From: Spencer Baugh
Subject: bug#69775: [PATCH] Use regexp-opt in dired-omit-regexp
Date: Wed, 13 Mar 2024 11:01:05 -0400

Tags: patch


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.

* lisp/dired-x.el (dired-omit--extension-regexp-cache): Add.
(dired-omit-regexp): Use regexp-opt.
(dired-omit-size-limit): Increase, since omitting is now faster.

In GNU Emacs 29.2.50 (build 4, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-02-28 built on
 igm-qws-u22796a
Repository revision: 46e23709d37943a20faa735c97af520196a443e9
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.9 (Green Obsidian)

Configured using:
 'configure 'CFLAGS=-O0 -g3' --with-gif=ifavailable
 --with-x-toolkit=lucid'

Attachment: 0001-Use-regexp-opt-in-dired-omit-regexp.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]