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: Mon, 1 Aug 2022 01:03:54 +0300 Message-ID: <6ea376f6-d503-06d8-6d83-50c52b695394@yandex.ru> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@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="13813"; 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 To: Gregory Heytings , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 00:05:12 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 1oIH3g-0003N1-Fp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 00:05:12 +0200 Original-Received: from localhost ([::1]:41604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIH3e-0001pY-Su for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jul 2022 18:05:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIH3W-0001pB-AD for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 18:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIH3W-0004jh-1G for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 18:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIH3V-0006rh-Qq for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 18:05:01 -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, 31 Jul 2022 22:05:01 +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.165930504626321 (code B ref 56682); Sun, 31 Jul 2022 22:05:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 31 Jul 2022 22:04:06 +0000 Original-Received: from localhost ([127.0.0.1]:38722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIH2c-0006qT-91 for submit@debbugs.gnu.org; Sun, 31 Jul 2022 18:04:06 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:46965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIH2a-0006pz-Le for 56682@debbugs.gnu.org; Sun, 31 Jul 2022 18:04:05 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id l4so11987137wrm.13 for <56682@debbugs.gnu.org>; Sun, 31 Jul 2022 15:04:04 -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=7JxYTX+0vBqvuGxv/I7yXce6FKbLEHJNihL/XoGjtp8=; b=f6G4IZAWm1eUrC+yEN/cvf6HZOhShtg7zjp+4cQsI833MYuyCIr4fnLU+TF8XFDGnA v5pWMfoKUGa1b0i+obWZcSU4rXuI03WLh8Dpyne4AwPYNcoW/PQMoWEqMZ1lUxWhZ+bK eZTxV3F+2jGeNL2xsP6q5ecy+YJY6XdNDLLsdRqFay3MYyASj5arj36oUQJ1WiJahH0g d7uvpfQ2SM6B+Q8Mqh9i3A4Ytz02DnIlgkIWBg0HXtOPc9/9Q7PGzVapO7SjisUmeNPt RJv92xaWHQWjQm4dxQQEFxoT8iOTlZsbfQqGMVnCLvsLVo2xP126qgmQo0Dap8nU9gQc LxFw== 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=7JxYTX+0vBqvuGxv/I7yXce6FKbLEHJNihL/XoGjtp8=; b=3GZqhyGR6i1eK9LcBn34b04HK8RJD7e7VqnWEvwFmzA4mXj2//coAG0KBq5uIYMECv qowC/YfbCK5nl2u5GSkc00aN4g3+WV0I5gwAiae+Lq66Xd+TIomDbfPzsdD1xdWgEV5W r5mj0yvl/6Or0p7z/CXFf6fjFMTTiWVK5y7BU4mmDLscfDh5iDyV/J6aqaoxVofbWVyp L4JfYea3j9UZ1sB5LEDb6OyPzxw4md8zkl7pWxsIAcGImQScPFuIQ1swP0tZZoccm3vN SAUV2HH0go4O7tO1s8/ZjwDf804Ev2l/l5CMEGDoBfEArSTiDD24Ykc/zlSEQgU9zNHi TKeA== X-Gm-Message-State: ACgBeo2r1pylh3RTUAnFEUC/vOtjrcx+YuohNI5Lw/NwkGKx95xqJTlR hsmXdr3yHoirRn8B0A5MFnc= X-Google-Smtp-Source: AA6agR5FA6Moo1Oq4nkZjaBjdlOkLpnBKifdMogusSmjS+eLRzegfvrREHRI6SyhdsJGYktTPylGiA== X-Received: by 2002:a05:6000:986:b0:21e:939b:a71 with SMTP id by6-20020a056000098600b0021e939b0a71mr8687237wrb.256.1659305038536; Sun, 31 Jul 2022 15:03:58 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i6-20020a05600c480600b003a31f71c5b8sm19030446wmo.27.2022.07.31.15.03.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Jul 2022 15:03:57 -0700 (PDT) Content-Language: en-US In-Reply-To: <8c7321f2f388e5343475@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:238367 Archived-At: On 31.07.2022 13:50, Gregory Heytings wrote: >>> BTW, my tests show that syntax-ppss can be rather slow, when the file >>> is large enough (say 1 GB). >> >> No doubt.  But it's no slower with long lines than with short lines. >> > > Yes, I wasn't clear enough, I should have written "when the file is > large enough (say 1 GB), even without long lines". What kind of scenario are you thinking of that would exhibit this slowness in a 1 GB file? If we're talking about syntax-ppss only, regular editing operations (typing and deleting code) limited to, say, one screen should trigger only a rescan of a limited area inside such buffer. Both when the editing happens near the beginning or near the end of the buffer. Or in the middle -- no difference.