From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Sun, 07 Mar 2021 08:13:23 +0000 Message-ID: <36d537dd5d4b52827fc3@heytings.org> References: <4119ea30554b406efbbf@heytings.org> <4119ea30558f1e4145b0@heytings.org> <4119ea30555e80bdcf7e@heytings.org> <1c82e582-8b90-f3c5-5391-1e88ca4e7ab2@yandex.ru> <4119ea30553e3f90ab8c@heytings.org> <87y2f42ex5.fsf@mail.linkov.net> <4119ea30552873ab9870@heytings.org> <83eegvk2u0.fsf@gnu.org> <9cff0f8894658f3b50c8@heytings.org> <83y2f3huz2.fsf@gnu.org> <9cff0f88942d4103c685@heytings.org> <83mtvjhrzj.fsf@gnu.org> <9cff0f889435d8d03313@heytings.org> <834khq266r.fsf@gnu.org> <9cff0f8894ab45713d12@heytings.org> <16ac41d4-5718-0cec-a68b-4abcc736ee4a@yandex.ru> <109276c6-30fb-b1ca-cafa-48a15710099b@yandex.ru> <7de1aeec520f4204be5b@heytings.org> <7de1aeec52841199faed@heytings.org> <7de1aeec5237788b3d98@heytings.org> <9bffe138-52a4-e489-f049-949657a18dd4@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ePt0aOXSVB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17423"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46859@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 07 09:14:10 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 1lIoYE-0004QH-8l for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 09:14:10 +0100 Original-Received: from localhost ([::1]:38792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIoYD-0003AW-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 03:14:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIoY6-0003A9-Ta for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 03:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIoY6-00063a-JO for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 03:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIoY6-0004Jk-F4 for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 03:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Mar 2021 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46859 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46859-submit@debbugs.gnu.org id=B46859.161510482116555 (code B ref 46859); Sun, 07 Mar 2021 08:14:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 7 Mar 2021 08:13:41 +0000 Original-Received: from localhost ([127.0.0.1]:38858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIoXW-0004Ij-Hm for submit@debbugs.gnu.org; Sun, 07 Mar 2021 03:13:41 -0500 Original-Received: from heytings.org ([95.142.160.155]:46564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIoXU-0004Ia-Up for 46859@debbugs.gnu.org; Sun, 07 Mar 2021 03:13:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1615104803; bh=YljmdQSkeDozW5tZ4rCw3Wgm9oqB3VArfRKSLQmcvhM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=m0p5CtHMxkUhq7nK93Mf8pIITUWscLzqr/8g1eGD1Dfd6dO1lnINnubv+v9X4NBsw 4A1nJ7tXfOHX3GZc2V45lHy5tFc2z1xX/NmwMBpxLOI/Wc5US0VGfspymqmcWAFdoY JYjSUxJK9i+j9kZR6p3JAYLDv4wwAFxtV/kgXCh21VICXs1k+epL8f4uvbitic6v+6 BtXbmA+6oawnD4bXtL5vRsauy3AB5+Z4CXxbsCHjNZG3JA+wDmEF8kJGl/XrWLNwSS 2+2hzrA8xsp9893JTHrcRg5AGTN0cq8GUn5IwBQmjAX7Z78mdoNeVHZ9S53Imf22hd qrOZrzUPNTJWA== In-Reply-To: <9bffe138-52a4-e489-f049-949657a18dd4@yandex.ru> Content-ID: <36d537dd5d207d1760da@heytings.org> 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:201731 Archived-At: --ePt0aOXSVB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <36d537dd5d8a3d4e7cb5@heytings.org> >> I don't see a big difference: find takes 0.006 s, git ls-files 0.002 s.= =20 >> Okay, that's three times slower, but those four milliseconds are not=20 >> the bottleneck here.=C2=A0 I just ran some of the timing tests again, an= d=20 >> they are about ten milliseconds faster with git ls-files, which is not= =20 >> a huge difference.=C2=A0 (Of course I do not object to the use of git=20 >> ls-files.) > > Sounds like you're testing the case of a project with not many files=20 > which compensate for their number in (larger) size. > As I said, my tests are performed on a fresly cloned copy of the Emacs=20 repository (~5000 files). It's not a huge project, but it's not a small=20 one either. >>> So if you redo your test with 'project-find-regexp' as I suggested,=20 >>> you might discover a different slowdown multiplier. >>=20 >> I wanted to first time these things outside of Emacs, it seems to me=20 >> that it's a more objective comparison. > > Very well. > > But testing inside Emacs is important, too. > Yes. It is important to test at each step of the pipe; step N can't=20 become faster than step N-1. > > Because with the results you shown as of yet, the proposed alternative=20 > is twice as slow as the existing code in the average case. Is that=20 > right? I wouldn't like searches that take 200ms now take 400ms. > Of course you can't get a benefit without paying a certain price. The=20 tests show that, on the Emacs repository, a search takes 250 ms instead of= =20 125 ms with GNU grep, and 100 ms instead of 50 ms with ripgrep. IMO that= =20 price is not too high, especially not for a user dialog (I don't see how a= =20 user could be annoyed, or even notice, that something takes 250 ms instead= =20 of 125 ms), but it's just my opinion. > > Emacs's overhead could alter that picture, however. > Indeed. --ePt0aOXSVB--