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: Sat, 06 Mar 2021 12:49:14 +0000 Message-ID: <7de1aeec52418a3d5fd5@heytings.org> References: <87im69uzlt.fsf@mail.linkov.net> <878s74fv27.fsf@mail.linkov.net> <4119ea3055ef8f306fc0@heytings.org> <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> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14867"; 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 Sat Mar 06 13:50: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 1lIWNm-0003kj-LF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 13:50:10 +0100 Original-Received: from localhost ([::1]:53882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIWNl-0002Cz-Ie for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 07:50:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIWNe-0002Cl-7A for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIWNd-0003bD-PM for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:50:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIWNd-0008VI-M6 for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Mar 2021 12:50:01 +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.161503495932633 (code B ref 46859); Sat, 06 Mar 2021 12:50:01 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 6 Mar 2021 12:49:19 +0000 Original-Received: from localhost ([127.0.0.1]:36212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIWMx-0008UF-Cv for submit@debbugs.gnu.org; Sat, 06 Mar 2021 07:49:19 -0500 Original-Received: from heytings.org ([95.142.160.155]:45462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIWMu-0008U5-Br for 46859@debbugs.gnu.org; Sat, 06 Mar 2021 07:49:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1615034955; bh=RdnFDBijsg/ewvfutvseWXdbHTAKycK4s+HOZaOyjPw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Nna0ChR0L2O9KyAe3Hu0ROP7ARaJ170S7zjSWV/NjpCZWTw+uGWj/U3zrfCnk1hML T/rSCZhVv5is8iNriV5a/Vynl66WTqQnEckmz5R3DbWJ4pUoILAE4ojSVxSDoh0xDv PpSpHVW7AQeP0sv8O3podUJRKa0lFcrYcFfilhbZwmmcu7pzAMoy8DsbHmLXLWAD+j zI2fanVgpB9nQe1iS8XQ+75PrBg8iMbOexjq9PDhfFYJbKcrmYXeqle6z4shk4cM/m unVt8DiqQyZgliavczwx2ygLwLSWMQgjANFmTnelHzXEOZI0XhUp1lZi3UfoZ/Mzh8 TleXTzQoltKdQ== In-Reply-To: <16ac41d4-5718-0cec-a68b-4abcc736ee4a@yandex.ru> 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:201621 Archived-At: >> Just tried 'exact, it works, it's slow (but not horribly slow: 1.2 >> seconds on that 25 MB file) > > 1.2s is pretty slow for this purpose. > It is: (1) on a 25 MB file (not the typical case), (2) on a file with an exotic encoding (not a typical case either). On typical files (UTF-8 or single byte encoding) the delay is not noticeable (a few milliseconds). > > Otherwise it would be possible to use this approach (by introducing a > Grep-specific location type) and avoid parsing the line contents for > every match. > It would be much faster, especially with very long lines, which was the question with which this bug report started. > > One downside would be missing on the syntax highlighting which we > sometimes get for already-fontified parts of buffers, but it's > unreliable anyway. > Yes, I don't understand why syntax highlighting is used in such buffers, IMO it's useless, it would be useful only if (1) it were reliable and (2) all lines were highlighted.