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#56682: Fix the long lines font locking related slowdowns Date: Sun, 7 Aug 2022 14:14:24 +0300 Message-ID: References: <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <8c7321f2f36494299e61@heytings.org> <83v8rc2n1h.fsf@gnu.org> <64084296-1953-8ef8-5938-adfb6fb9b43f@yandex.ru> <83r11uzs8n.fsf@gnu.org> <14845631-c2ef-8371-8606-c858092e3192@yandex.ru> <83mtcizov2.fsf@gnu.org> <83h72qzheq.fsf@gnu.org> <25717d84-3411-a93a-3620-e04fe0571aff@yandex.ru> <83edxuzemr.fsf@gnu.org> <83a68hzz0a.fsf@gnu.org> <835yj5zkm4.fsf@gnu.org> <75558ca18e15abb45e9e@heytings.org> <85c0c8fb-4435-cf61-2b9e-93630537a40a@yandex.ru> <75558ca18e4a8cd4eea6@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="25800"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: 56682@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 07 13:15:14 2022 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 1oKeFV-0006Wj-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 13:15:13 +0200 Original-Received: from localhost ([::1]:39612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKeFU-0000i5-Tk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 07:15:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKeFL-0000hQ-5o for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 07:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKeFK-0001wC-Ts for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 07:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKeFK-0000HB-Ny for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 07:15:02 -0400 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 Aug 2022 11:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.1659870877977 (code B ref 56682); Sun, 07 Aug 2022 11:15:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 7 Aug 2022 11:14:37 +0000 Original-Received: from localhost ([127.0.0.1]:36050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKeEv-0000Fh-5S for submit@debbugs.gnu.org; Sun, 07 Aug 2022 07:14:37 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:47004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKeEt-0000FV-Dn for 56682@debbugs.gnu.org; Sun, 07 Aug 2022 07:14:35 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id l4so7934554wrm.13 for <56682@debbugs.gnu.org>; Sun, 07 Aug 2022 04:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=OQo0Au7R14wPlaGR1qkM2U7HYIpg5SFicdusnKBdEJE=; b=Q8YfGwFHOWCazGMrR93iOGgbP+0K4QLizu42AyzLmBuQzxDV71eMwW/4DyvdZTd/LA jGPl0UIE57G9JUS2LNKd7czJiJobOeIUV78CHDhKUge8u/EjWVhoIgoVS70m+GlGsTTr jC4Ydjni1lMBpvgjFT7+D0SKsnkCFd8ir3cQQkXw3DKCP5abcm7uZj/PQRCAWjZabCsh +SeCUlS+f7A6rvcIK2ZD9gR6UHpXXuEab9mcSJ8ifZKHSxtUq2uS+k6ZxhSJltgMmyty 9rjyUEpuQPNrAADZOjBxWg4OOqD5R/zORCTjnlm9kC9LOBvbQlBfax9WBkCjFWr7TyWY htCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=OQo0Au7R14wPlaGR1qkM2U7HYIpg5SFicdusnKBdEJE=; b=JKQGO99jV9f2Uu8FlYga+bOciVqY8uV9HIAHgde8huDoW7qsUZsh8/9K4OdrRcgNyU AmtL3rTrOeQjFPpD/mnY20UwSwJWKDnuYyqOK1QKadiPLZU9HFWkfy5SZ5GtArSp5hrA EJIr8t+iOVo/125Mi5PXpXyuzO1GdhN2LXqcCJtIO1UjjwMar4uajG/vMZRK5tYcBMlZ zSt8xq2wYXRmVf9nO5hyYBQIuvNxw2htatQLzs+Jqj5UYi5Q9Z5Mul22W+drlaYGnv0w Ct0lc8dHgWpNg3bx3lUU75WzDNPBDBmeBSfTbUUlr1FrHhSw4t1PVfmHSWuLZ/HBdFuG Emjw== X-Gm-Message-State: ACgBeo1QACFDknP58n4C0aiy36FdeccDqKs37HXJbtIH3kcX5ORwKxRl PoJeThOzqGj/2qWNlQAk4AE= X-Google-Smtp-Source: AA6agR40VezXAh0dAz5XB/JIV9aosTKzG/Z5JSG2qX4HftashQ225doUGRPOnDjw1X4wnC+R9n8JvQ== X-Received: by 2002:adf:f74f:0:b0:21e:f321:2700 with SMTP id z15-20020adff74f000000b0021ef3212700mr8613307wrp.639.1659870868406; Sun, 07 Aug 2022 04:14:28 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h10-20020a05600c414a00b003a32167b8d4sm16353857wmm.13.2022.08.07.04.14.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Aug 2022 04:14:27 -0700 (PDT) Content-Language: en-US In-Reply-To: <75558ca18e4a8cd4eea6@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:239040 Archived-At: On 07.08.2022 02:29, Gregory Heytings wrote: > >>> Especially given that the said correctness has always been relative. >>> So it's not like we're leaving the heaven of 100% correctness and >>> falling into the hell of 10% correctness.  A more reasonable view of >>> the situation is that we had 90% correctness and now have, >> >> As someone who worked on different major mode and syntax-ppss itself a >> little, that feels moderately insulting. >> >> No: we strive to close to 100% correctness in supporting language >> syntax and can often reach it with moderate effort (programming-wise). >> > > It isn't meant to be insulting, and I think you understood that.  My > experience is simply that highlighting in Emacs is definitely not "close > to 100% correct", whatever be the mode.  The most correct one is perhaps > emacs-lisp-mode (unsurprisingy). Have you ever managed to trigger incorrect highlighting in a JSON file? Without the recent changes, that is. >>> in files with "loo long lines" and only in those files, 60% correctness. >> >> Does the attached screenshot look like 60% correctness to you? >> > > A small sample of a big file is definitely not representative, and I > think you understood that. Did I need to send the screenshots of every screen? Like I said, more than half of the file was like that. And then I restarted with 'emacs -Q', and the result looked even worse. >> To me, it's more like -60%. Or at least, that's what the utility of >> such highlighting will be (negative). >> > > In which case you should turn highlighting off in such files.  That's > what all other editors do anyway. That's the same as saying the user should turn off font-lock if they experience performance problems. Except in this case they would still have choice to suffer a little in the performance department (and the amount of said suffering will highly depend on their use case) but keep good syntax highlighting.