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: Wed, 3 Mar 2021 19:29:34 +0200 Message-ID: <666564dc-0252-6bf5-04e1-58c9916cffbe@yandex.ru> References: <87im69uzlt.fsf@mail.linkov.net> <25782781-4baa-5d44-99a1-2e57552ab3a0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19596"; 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 To: Theodor Thornhill , juri@linkov.net, 46859@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 03 18:30: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 1lHVKF-0004zz-SG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 18:30:19 +0100 Original-Received: from localhost ([::1]:42356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHVKE-0006lD-T9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 12:30:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHVJz-0006ke-7L for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 12:30:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHVJy-0000Qv-UQ for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 12:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHVJy-0006GG-QF for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 12:30: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: Wed, 03 Mar 2021 17:30: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.161479258724024 (code B ref 46859); Wed, 03 Mar 2021 17:30:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 3 Mar 2021 17:29:47 +0000 Original-Received: from localhost ([127.0.0.1]:56899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHVJj-0006FQ-7l for submit@debbugs.gnu.org; Wed, 03 Mar 2021 12:29:47 -0500 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:34751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHVJf-0006FB-HW for 46859@debbugs.gnu.org; Wed, 03 Mar 2021 12:29:46 -0500 Original-Received: by mail-wm1-f41.google.com with SMTP id o7-20020a05600c4fc7b029010a0247d5f0so3242341wmq.1 for <46859@debbugs.gnu.org>; Wed, 03 Mar 2021 09:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=p5HHyvSY4NXucIrogzqiI8el4iqtNQ6JrcfqERBFFhQ=; b=JSNwhberAGxuPUeZJPCCuqRDCQFGDBaqMO6mlu3W30UeyTe9KkTRSFn+Ssc2FLXkaN +k86QZvY5G04F10PmRd3U7Vrwe65ZV/CQrcfSrRe5ZTkguKjFC7/aP2EbVhAlXl9TbfF BkcNg2pGf20VaNDB601zPHheK6Xyvcl8aZ2Lcgy8DZ5HTz28O6T7PsN3OX/uabzf36BX XmSeXNagXF/l56EQpqv5slIgkSLmy8b6zogAOEDmG77VLb4BvCEzDiL9Adk2v7E9GfYv I3iCTgkO80uuswO5mCXeSDnCULNGGLvPJfeSv0vmaaeYGzX+B8W9HuI0Z7GrsNKTkvRh YZJg== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p5HHyvSY4NXucIrogzqiI8el4iqtNQ6JrcfqERBFFhQ=; b=lF/gDMCEhQSMIa4Lm5yhWgjL5ZFDKeyElMr023de83qh8Nj6+PoqBxCRNfpcXMTEed 0TG4BLAeDjWjt+CAmuWxNF3Nh4HeZRn9rOoHFHa+l+a+Ht64N1gRhoUWUFNJJu/IQK7x G1Wi9Xi7rkyDvOzmOmQXT+tr4w9W2KiRIPGtX7qXqJUwJ12sR51+elkbQPuQ8Ptta5KK Z92kLImVgHiqoqLu6qswn+rhay1PWc0LtXBAyNwHPKnAxtPHTcVuajFiSYFxISCngSvt 15KD+/csAAj2vv5gIuk+/K5lrjvNZ+On363Kdy7NW9MU7J8HlZPxdQqIzVgBSoRty8h/ CTxQ== X-Gm-Message-State: AOAM533KWbNZDVFQxRhjxBcxJrIJjEMT8vAlXA7i1JdulMFjxCF2bVAE wopjuPk1mMNBcgpCMPhcNqPEz34Pe04= X-Google-Smtp-Source: ABdhPJz6QZUQCH4yAIwh2oXaGKXP8REl3ojJcWbxudvW1wAuSRaowmCZyC1qz35cUGyZOhNYK9k4gw== X-Received: by 2002:a05:600c:2282:: with SMTP id 2mr66369wmf.93.1614792577808; Wed, 03 Mar 2021 09:29:37 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m10sm6367754wmh.13.2021.03.03.09.29.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Mar 2021 09:29:37 -0800 (PST) In-Reply-To: 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:201297 Archived-At: On 03.03.2021 18:13, Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > This long line has 25 matches, so yeah, that takes some time. With your > hint here I tried another approach which yielded some nice results. Thank you. Could you also try this benchmark with an input string that has no more than, say, 3 matches in the big one-line file? Or maybe just 1. I'd like to compare the relative performance in such scenario, too. > However, only my patch actually renders the long file as a match in the output buffer. All the others seem to drop it altogether. IMO that is one point in favour of my approaches. Indeed. > In addition, we could add another defcustom for the xref--collect-matches-1 function, That can be done already by the user customizing xref-search-program-alist, I think.