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: Mon, 8 Mar 2021 05:24:33 +0200 Message-ID: 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> <36d537dd5d4b52827fc3@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="24580"; 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 Mon Mar 08 04:25:19 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 1lJ6WE-0006JF-Ll for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 04:25:18 +0100 Original-Received: from localhost ([::1]:38420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJ6WD-0007sF-Kn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 22:25:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJ6Vy-0007s5-PX for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 22:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJ6Vy-0004od-Bh for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 22:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJ6Vy-000183-6r for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 22:25: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: Mon, 08 Mar 2021 03:25: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.16151738894287 (code B ref 46859); Mon, 08 Mar 2021 03:25:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 8 Mar 2021 03:24:49 +0000 Original-Received: from localhost ([127.0.0.1]:41843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ6Vl-000174-8k for submit@debbugs.gnu.org; Sun, 07 Mar 2021 22:24:49 -0500 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:46684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ6Ve-00016n-Tm for 46859@debbugs.gnu.org; Sun, 07 Mar 2021 22:24:47 -0500 Original-Received: by mail-wm1-f46.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so2891593wmd.5 for <46859@debbugs.gnu.org>; Sun, 07 Mar 2021 19:24:42 -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=HyRLmnT7BlVNJvl78mIcg4WBFm31yk0pI/lQWYll5vo=; b=Ssubsd/HCiHAktXg6iNigCh8+JlE0JthZ3UGQeXwGR/x3/8aRqNP8ilCFQLG4yhsD4 fZGLJ9Nsvx0O5+qQS08WQsKgLpib3d3azCRjhBF74cQ5t+LNJnEBWWScX/9xRAh3oluR IspESA3tUCy0CiIphvuN9wDdTWSZUZ7mIw61FAlYM3TebfahDjYdnUjFXOpN4/1JV8TE Txoubdr4BPFKAPGB+wJrGpWVr9CI426mjN1MUai13WjXt4tKv4PyHFml6WjfugY7e7RW +LVofEifIb6kyEazdOMSVMfV9hn7nTOWk9BNyjTfHzScQM8aj0oh5dTONl8cqHMVETkL vEgA== 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=HyRLmnT7BlVNJvl78mIcg4WBFm31yk0pI/lQWYll5vo=; b=sfv1/t9W+2sxKRUzjMSTmlszgdcdLB2VGqKuoDof91X1Q5pXrIRNYetLJkyBpiFsFX pvRS9Fv2H7A6Exd23onk0TnfmFYwOHOZnJFkk15s/zuXqNi2k7y8p41av6403bZBFFoY Y9IbKA9RJ+DtAbrTpIkPwSiEU+sb/zWHcY698PItdYnJ04wjLkPP4HqJWb6OLhPcP3NJ LiNG1ufKUWHN4Czfthum8ySNZkTvKXOe43WR4+LDZs4E5XFux5KkvTMsxNozWM4N3lj3 gXHS3EET8xJwS3nAEq2UKWLjCr/YVqS3aRFM9x6cBOtkhKw/7j6aInuFnTh5qz/GZGNF LmzA== X-Gm-Message-State: AOAM532kTp02Q/brEXEr5BrRtyxG/DQTQJDMkCYB9ION+2ogYo3rqh59 K7oYyWDLG23nP+fyH9lE24KdOqNjbfE= X-Google-Smtp-Source: ABdhPJxvnT1revoMb0UsYX8L8WLx9oa+1MZYLA92Gx15M38Ur4xdVGSUh4gSp4RfwJWQg1XLM0hbeA== X-Received: by 2002:a1c:c90c:: with SMTP id f12mr20282958wmb.98.1615173876985; Sun, 07 Mar 2021 19:24:36 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v9sm16318441wrn.86.2021.03.07.19.24.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Mar 2021 19:24:36 -0800 (PST) In-Reply-To: <36d537dd5d4b52827fc3@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:201799 Archived-At: Hi Gregory, On 07.03.2021 10:13, Gregory Heytings wrote: > As I said, my tests are performed on a fresly cloned copy of the Emacs > repository (~5000 files).  It's not a huge project, but it's not a small > one either. Hmm, both 'find' and 'git ls-files' take a little more than that on the Emacs repository. But my impression on 'find' is skewed because it performs much worse as soon as we try to ignore files with it. When no predicates are used, it's fairly fast and shouldn't be too much of a problem in this comparison. >> 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. >> > > Of course you can't get a benefit without paying a certain price. Well, yes and no. I have just improved performance in the case under discussion significantly with no loss in functionality or measurable loss of performance in "normal" cases. I don't mean to be discouraging, but the benefits should be pretty great for us to pay the price of 2x slower matching speed. And it wouldn't be necessary of Grep had an option to limit the displayed context around the match without us mucking with the regexp. It would solve the issue of incorrect byte position, too. > The > tests show that, on the Emacs repository, a search takes 250 ms instead > of 125 ms with GNU grep, and 100 ms instead of 50 ms with ripgrep. IMO > that price is not too high, especially not for a user dialog (I don't > see how a user could be annoyed, or even notice, that something takes > 250 ms instead of 125 ms), but it's just my opinion. The bigger the project, the longer it will take. Emacs is not the biggest project size we want to support.