From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Sun, 7 Mar 2021 05:08:42 +0200 Message-ID: <9bffe138-52a4-e489-f049-949657a18dd4@yandex.ru> References: <4119ea30557ef84ca190@heytings.org> <7eb7ee0f-7dba-c90d-cb58-af42c3828643@yandex.ru> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14638"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 46859@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 07 04:09:22 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 1lIjnF-0003fM-OJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 04:09:21 +0100 Original-Received: from localhost ([::1]:54206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIjnE-0004mg-Qh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 22:09:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIjmw-0004gI-L1 for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 22:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIjmw-0007TV-Dj for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 22:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIjmw-00052L-5w for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 22:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Mar 2021 03:09: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.161508653419340 (code B ref 46859); Sun, 07 Mar 2021 03:09:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 7 Mar 2021 03:08:54 +0000 Original-Received: from localhost ([127.0.0.1]:38692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIjmo-00051s-CZ for submit@debbugs.gnu.org; Sat, 06 Mar 2021 22:08:54 -0500 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:46001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIjmm-00051e-Dg for 46859@debbugs.gnu.org; Sat, 06 Mar 2021 22:08:52 -0500 Original-Received: by mail-wm1-f50.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo1672681wmq.4 for <46859@debbugs.gnu.org>; Sat, 06 Mar 2021 19:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Y21ShyFkDiiLMVF1mBHW+FbynZMVIzOISJ8hleyaxUc=; b=EakZE4nsaw76kL4mI9j/wtEGJ+BV8NXOY0hDC1/Ct1f9IpgaSJGr4kr/XDi1QHkOSX WRRKKy1murXjuogMVajE1fN+A1MPZC/6OIXbMtCrt0mTic78T9C4456gM2pdBtb+CnHq YRhzNnG4sK2wT8ROttNp9+/MtS1sS4QruOVafdUJAgmAQ5UxLW0h8fM6Mfo52vw4ApJ9 U9gn8+6ycm9DfuvMm5DIJZ0a0wCMdMT8JLDppmBEqAugUWJVdsEeHLIWQzR24F1FwTpk DmXVtRkzZ6FtU5GLj5NA47a8EvX9wwGRWo7wWwAqNmTrhOnKWOdYOeAZvi9uVp9aZnw4 MZKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Y21ShyFkDiiLMVF1mBHW+FbynZMVIzOISJ8hleyaxUc=; b=QJivS5XUysJYdaXdNgp+Mnl7trkKJHEjyq4GfaT03yojUXVOC0MSKV1dojYNcVSK8e BWR5Q1k46zwhKjex7bYF9kuTJC4pPNqHgKeVeSuNGicq8E8SD4WV1/SxGomc3hnYDlFi 0lNIzMeF5f5IMg4M9gNTS2NWCZEU9KYDEfr70z0iZbJfvHa1GHAxk8EauMOi9ogzIU79 G3+P/KOUidGSuCfoz1iUnh4x77A1iynmNWm0DU8Fb08QJ6fB8QasT+27gnanf1RvLlEU vhMSJz+ClnH4I+zfQBFaxlw623WX9s8uytjFK0wn/ewXuowNWAH5mqhvgDL3MYRayjlI gQbg== X-Gm-Message-State: AOAM533RZhagELzqrYhSzJk9baJuhBpacyGcdsk3glMJMrb+R+qqGNDB yRME+t7ZegX+bedTSANVY0pDxvacJ5I= X-Google-Smtp-Source: ABdhPJwq7c2d0Bhx9fpS6wqcZ6oTTcQNecv9ySNClp9dIoc+1zpq4pBy6L+lQPjWyLhBEq53v49Muw== X-Received: by 2002:a05:600c:6d4:: with SMTP id b20mr16027499wmn.142.1615086526596; Sat, 06 Mar 2021 19:08:46 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c128sm33121124wme.3.2021.03.06.19.08.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Mar 2021 19:08:45 -0800 (PST) In-Reply-To: <7de1aeec5237788b3d98@heytings.org> Content-Language: en-US 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:201711 Archived-At: On 07.03.2021 01:24, Gregory Heytings wrote: > >> >> 'find' is rarely the fastest way to list all the files in the project. >> Have you timed it alone? >> >> 'git ls-files' is usually much faster, and that's what 'project-files' >> uses under the covers. >> > > I don't see a big difference: find takes 0.006 s, git ls-files 0.002 s. > Okay, that's three times slower, but those four milliseconds are not the > bottleneck here.  I just ran some of the timing tests again, and they > are about ten milliseconds faster with git ls-files, which is not a huge > difference.  (Of course I do not object to the use of git ls-files.) Sounds like you're testing the case of a project with not many files which compensate for their number in (larger) size. That would indeed be sweet sport for using find in this scenario, so please consider that objection withdrawn. >> So if you redo your test with 'project-find-regexp' as I suggested, >> you might discover a different slowdown multiplier. >> > > I wanted to first time these things outside of Emacs, it seems to me > that it's a more objective comparison. Very well. But testing inside Emacs is important, too. Because with the results you shown as of yet, the proposed alternative is twice as slow as the existing code in the average case. Is that right? I wouldn't like searches that take 200ms now take 400ms. Emacs's overhead could alter that picture, however.