From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 69775@debbugs.gnu.org
Subject: bug#69775: [PATCH] Use regexp-opt in dired-omit-regexp
Date: Thu, 14 Mar 2024 13:00:00 +0200 [thread overview]
Message-ID: <86o7bh9iz3.fsf@gnu.org> (raw)
In-Reply-To: <ier7ci6kwge.fsf@janestreet.com> (message from Spencer Baugh on Wed, 13 Mar 2024 11:01:05 -0400)
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Wed, 13 Mar 2024 11:01:05 -0400
>
> In my benchmarking, for large dired buffers, using regexp-opt provides
> around a 3x speedup in omitting.
Can you show a recipe for such benchmarking? I'd like to try that on
my systems.
Also, what is the slowdown in the (improbable, but possible) case
where dired-omit-extensions change for each call of dired-omit-regexp?
> 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.
I'm okay with these changes, but:
. the change in the default value of dired-omit-size-limit should be
called out in NEWS
. please document this variable in the dired-x.texi manual, where we
document all the other variables relevant to dired-omit mode.
. the doc string of dired-omit-size-limit is embarrassingly
unhelpful, so bonus points for fixing that as well
Thanks.
next prev parent reply other threads:[~2024-03-14 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 15:01 bug#69775: [PATCH] Use regexp-opt in dired-omit-regexp Spencer Baugh
2024-03-14 11:00 ` Eli Zaretskii [this message]
2024-03-16 17:15 ` sbaugh
2024-03-21 10:38 ` Eli Zaretskii
2024-03-23 13:29 ` sbaugh
2024-03-23 17:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86o7bh9iz3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69775@debbugs.gnu.org \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).