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#50733: 28.0.1; project-find-regexp can block Emacs for a long time Date: Fri, 24 Sep 2021 14:00:31 +0300 Message-ID: <838rzmtf00.fsf@gnu.org> References: <03aa81b5-6077-c35c-1a5f-ec4d867b59ac@yandex.ru> <63300a34-e487-02d1-c182-2b84438654d7@yandex.ru> <83k0j6trau.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7852"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50733@debbugs.gnu.org, dgutov@yandex.ru, mardani29@yahoo.es To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 13:01:11 2021 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 1mTix5-0001t5-Oe for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 13:01:11 +0200 Original-Received: from localhost ([::1]:36400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTix3-0008Vt-81 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 07:01:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTiww-0008Vg-Jh for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 07:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTiww-0000wM-BC for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 07:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTiww-0002GG-9d for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 07:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Sep 2021 11:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50733 X-GNU-PR-Package: emacs Original-Received: via spool by 50733-submit@debbugs.gnu.org id=B50733.16324812518663 (code B ref 50733); Fri, 24 Sep 2021 11:01:02 +0000 Original-Received: (at 50733) by debbugs.gnu.org; 24 Sep 2021 11:00:51 +0000 Original-Received: from localhost ([127.0.0.1]:56759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTiwl-0002Ff-Ho for submit@debbugs.gnu.org; Fri, 24 Sep 2021 07:00:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTiwj-0002FS-IQ for 50733@debbugs.gnu.org; Fri, 24 Sep 2021 07:00:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37204) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTiwd-0000gK-2d; Fri, 24 Sep 2021 07:00:43 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3195 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTiwc-0006RG-Ks; Fri, 24 Sep 2021 07:00:42 -0400 In-Reply-To: (message from Gregory Heytings on Fri, 24 Sep 2021 09:00:13 +0000) 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" Xref: news.gmane.io gmane.emacs.bugs:215279 Archived-At: > Date: Fri, 24 Sep 2021 09:00:13 +0000 > From: Gregory Heytings > cc: Dmitry Gutov , 50733@debbugs.gnu.org, mardani29@yahoo.es > > > Btw, I don't understand why we focus on general-purpose text-searching > > tools for these features. Why not focus on packages like ID Utils > > instead, they are so much faster. Daniel, could you time the same > > search in that large tree when xref-search-program is 'gid'? (You'd > > need to run 'mkid' first, to create the ID database, but that is > > one-time, and is very fast.) As I told many times, I think this is the > > future: program language sensitive tools that use a precomputed DB. > > id-tools are useful, but they do not provide the same functionality as > grep/ripgrep. On Emacs' trunk, mkid takes a few seconds to create a 12 MB > database, and gid Eli returns only 4 occurrences. > > This can be improved by using mkid --default-lang=text, but then mkid > takes no less than 30 minutes (!) to create a 205 MB database, and gid Eli > now returns 25 occurrences in ~1 second. > > In comparison, rg Eli returns 6474 occurrences in < 0.1 seconds. We are talking about project.el, so the focus should be on looking for strings that are meaningful in the programming-language context, because that is what we need when programming. Not looking for arbitrary strings. If someone wants to look for arbitrary strings, they want "M-x grep" (with or without ripgrep), not project-find-regexp. The meaning of "word" or "symbol" is different in different PLs; a tool like Grep can only approximate that, whereas ID Utils uses the correct definition for each language. > Moreover, incremental updates are not implemented in mkid. It doesn't matter, as it's fast enough, and putting it on some kind of cron job is more than enough to allow forgetting that this step exists. TANSTAAFL, so please let's not insist on looking for one. We won't find it. Every alternative will let you pay something, so the issue at hand is to find the alternative that is the best on balance, for this particular feature, not one which is free of any price. That said, you are free to use GP tools if you think it's best for you. And I will always prefer ID Utils. My point is that we shouldn't ignore solutions such as ID Utils, we should include them in our consideration of what is "fast enough". We shouldn't consider only Grep, ripgrep, etc.