From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69775: [PATCH] Use regexp-opt in dired-omit-regexp Date: Thu, 14 Mar 2024 13:00:00 +0200 Message-ID: <86o7bh9iz3.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1907"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69775@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 14 12:01:04 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rkipb-0000IA-7T for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 12:01:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkip2-0008R9-Rn; Thu, 14 Mar 2024 07:00:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkip0-0008Qu-GJ for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 07:00:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkip0-0008Em-6e for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 07:00:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkipZ-0004VK-Ln for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 07:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2024 11:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69775-submit@debbugs.gnu.org id=B69775.171041405317293 (code B ref 69775); Thu, 14 Mar 2024 11:01:01 +0000 Original-Received: (at 69775) by debbugs.gnu.org; 14 Mar 2024 11:00:53 +0000 Original-Received: from localhost ([127.0.0.1]:48448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkipQ-0004Ur-Ms for submit@debbugs.gnu.org; Thu, 14 Mar 2024 07:00:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkipL-0004UW-W8 for 69775@debbugs.gnu.org; Thu, 14 Mar 2024 07:00:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkiog-00087w-H7; Thu, 14 Mar 2024 07:00:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=efUX4kMpyXb0Kpz3Y1MHQpce2BPQqseY3sZgbqVqRAk=; b=E8TcWBQw+bLy 94Fb8gqPm/EQKTzPyG9S0c9KjNfGA5p+iJyBMiZpbjDRa+QetUz41spopztBqaT5MSK5NM2HjlwrH lV11HSzgeqeAr6pjrdHhVMj/bnD/5hh7/mM01BJH0YU5qALv2v23C1lfnX+tbKUnr3uqS7LhPaWDi PVTz3WJeap9N1zLzXSiN2dKg/EclcMcPwPcsh3y4zTvRnGHe64eCXeYZ0tHrsFArceQx56HM7DNvv aEqdzgHFm6YXbXohbdsuzDKmgz4Go2T6HFxPlgM20SbYgBIRnbaACQNJ7GoSd9p19NtC+Attf8sFP 8VTqb3Dc8YgeAY3smegmtw==; In-Reply-To: (message from Spencer Baugh on Wed, 13 Mar 2024 11:01:05 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281608 Archived-At: > From: Spencer Baugh > 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.