GNU bug report logs - #36857
27.0.50; Reduce calls to xref-collect-matches in dired-do-find-regexp

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Tue, 30 Jul 2019 17:21:01 UTC

Severity: normal

Found in version 27.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36857 in the body.
You can then email your comments to 36857 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Tue, 30 Jul 2019 17:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 30 Jul 2019 17:21:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Reduce calls to xref-collect-matches in dired-do-find-regexp
Date: Tue, 30 Jul 2019 10:20:42 -0700
This is a proper bug report for an issue I raised on emacs.devel:

When marking multiple files in Dired, then running a search with
`dired-do-find-regexp', `xref-collect-matches' is called once per marked
file, when it could just be called once for the whole search. This can
slow things down quite a bit.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Tue, 30 Jul 2019 18:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>, 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Tue, 30 Jul 2019 21:44:38 +0300
On 30.07.2019 20:20, Eric Abrahamsen wrote:
> When marking multiple files in Dired

Could you estimate how many files you need to mark for this to become a 
problem? I'm really curious.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Tue, 30 Jul 2019 18:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>, 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Tue, 30 Jul 2019 21:45:48 +0300
On 30.07.2019 21:44, Dmitry Gutov wrote:
> On 30.07.2019 20:20, Eric Abrahamsen wrote:
>> When marking multiple files in Dired
> 
> Could you estimate how many files you need to mark for this to become a 
> problem? I'm really curious.

Never mind, saw your reply on emacs-devel. 200-300 is a respectable amount.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Tue, 30 Jul 2019 18:57:01 GMT) Full text and rfc822 format available.

Message #14 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Tue, 30 Jul 2019 11:56:00 -0700
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 30.07.2019 21:44, Dmitry Gutov wrote:
>> On 30.07.2019 20:20, Eric Abrahamsen wrote:
>>> When marking multiple files in Dired
>>
>> Could you estimate how many files you need to mark for this to
>> become a problem? I'm really curious.
>
> Never mind, saw your reply on emacs-devel. 200-300 is a respectable amount.

Does "respectable" mean "quite a few" or "a number we should be able to
handle without significant slowdowns"? :)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Wed, 31 Jul 2019 14:07:02 GMT) Full text and rfc822 format available.

Message #17 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Wed, 31 Jul 2019 17:06:01 +0300
On 30.07.2019 21:56, Eric Abrahamsen wrote:

>> Never mind, saw your reply on emacs-devel. 200-300 is a respectable amount.
> 
> Does "respectable" mean "quite a few" or "a number we should be able to
> handle without significant slowdowns"? :)

Hopefully both. :-)

I have an improvement in mind that would fix it, but there are a couple 
change I'll need to make in a related area (project.el) first, so please 
stay tuned.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Wed, 31 Jul 2019 15:57:02 GMT) Full text and rfc822 format available.

Message #20 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Wed, 31 Jul 2019 08:56:29 -0700
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 30.07.2019 21:56, Eric Abrahamsen wrote:
>
>>> Never mind, saw your reply on emacs-devel. 200-300 is a respectable amount.
>>
>> Does "respectable" mean "quite a few" or "a number we should be able to
>> handle without significant slowdowns"? :)
>
> Hopefully both. :-)
>
> I have an improvement in mind that would fix it, but there are a
> couple change I'll need to make in a related area (project.el) first,
> so please stay tuned.

Cool, thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Wed, 25 Dec 2019 16:32:02 GMT) Full text and rfc822 format available.

Message #23 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Wed, 25 Dec 2019 18:31:07 +0200
[Message part 1 (text/plain, inline)]
Hi Eric,

Please try the attached patch. It should cut down on the number of 
process calls.


[dired-do-find-regexp-speedup.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36857; Package emacs. (Wed, 25 Dec 2019 21:47:02 GMT) Full text and rfc822 format available.

Message #26 received at 36857 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 36857 <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Wed, 25 Dec 2019 13:46:39 -0800
On 12/25/19 18:31 PM, Dmitry Gutov wrote:
> Hi Eric,
>
> Please try the attached patch. It should cut down on the number of
> process calls.

That's great! The searches that once took "longer than I was willing to
wait" now return nearly instantly. Thanks a lot. The compiler complains
that `project--files-in-directory' and `project--find-regexp-in-files'
are unknown, but presumably that's easily addressed.

Thanks,
Eric




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Thu, 26 Dec 2019 16:01:01 GMT) Full text and rfc822 format available.

Notification sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
bug acknowledged by developer. (Thu, 26 Dec 2019 16:01:02 GMT) Full text and rfc822 format available.

Message #31 received at 36857-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 36857-done <at> debbugs.gnu.org
Subject: Re: bug#36857: 27.0.50; Reduce calls to xref-collect-matches in
 dired-do-find-regexp
Date: Thu, 26 Dec 2019 18:00:02 +0200
On 25.12.2019 23:46, Eric Abrahamsen wrote:

>> Please try the attached patch. It should cut down on the number of
>> process calls.
> 
> That's great! The searches that once took "longer than I was willing to
> wait" now return nearly instantly. Thanks a lot. The compiler complains
> that `project--files-in-directory' and `project--find-regexp-in-files'
> are unknown, but presumably that's easily addressed.

Thanks for testing!

Pushed as ccd7cd2c51.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Jan 2020 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.