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 12:46:52 +0300 Message-ID: <02e83b0e-1b5c-fe75-6e59-1f8ddff82d37@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> <6ea376f6-d503-06d8-6d83-50c52b695394@yandex.ru> <8c7321f2f3ac52bfee4b@heytings.org> <8c7321f2f3ec1ef81af9@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="22410"; 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 11:48:25 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 1oIS2C-0005j2-DS for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 11:48:24 +0200 Original-Received: from localhost ([::1]:53308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIS2B-000335-C7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 05:48:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIS1q-00030u-8n for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 05:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIS1p-0005pP-W2 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 05:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIS1p-0002um-Qa for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 05:48: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: Mon, 01 Aug 2022 09:48: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.165934722611080 (code B ref 56682); Mon, 01 Aug 2022 09:48:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 1 Aug 2022 09:47:06 +0000 Original-Received: from localhost ([127.0.0.1]:39338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIS0w-0002se-Ih for submit@debbugs.gnu.org; Mon, 01 Aug 2022 05:47:06 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:46847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIS0q-0002rw-Kc for 56682@debbugs.gnu.org; Mon, 01 Aug 2022 05:47:05 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id w8-20020a05600c014800b003a32e89bc4eso5301616wmm.5 for <56682@debbugs.gnu.org>; Mon, 01 Aug 2022 02:47:00 -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=Gk8TpY7v6F1Rk2z0k6mBIVwCiUvlHF6S44xDQ4jvnHM=; b=CTh/iRk8rxluXrPA9Yj5mkKmMOe5WfYr2eHWvrtnXpAIjAzim4YAWR19dwmRiLOpBO yhwxdK2+49MdkqymGh6FBzotrb54/fqppQWq/BQ1vN7OUqC2Twty0S50FmQdX8u3o9L6 0SwhwncRnFljFR7sOXQ2/ODDCYSGK6oRBTA2/Z+MjqO7gZNMlHDkkj5fM6tC+rGQys+j vGm+kH7nSqDMTCFpMraXWswkyZz6VlPa8lB6Z1Xea7gbpKTIr3ZrBx4wwqYwES0G+Pg9 eKUtBkGI0SEw3nBmTxO2q23fcUQzDX5Yi3veVX+zvsv90F8B4/7HIIa3cvSwjWB+a1pY 092Q== 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=Gk8TpY7v6F1Rk2z0k6mBIVwCiUvlHF6S44xDQ4jvnHM=; b=7STcvAdiSQbrZcd9w72Zr8GGAtRJcnqbpDQ6ybX38ErNW7yQT76kvZ1sIyWtuvWngB zgAsgPEmsY67E+yXcwOSQOdT0mEllWKFT0tAzdbx1MtOvoWo+l/p2B9GtRufoxoK9k/U HGo3ylDBgp0ke/ZvKTxBhS6+YgkqIgfAs7ZuEAXqY/0EPf5lJc/cwtgVQOZHb1SID4IO XSO0KXbK+wQHJc90Gco0970aeq9jurRZm01mGJ/r+79TaKYCU8o3cyYdn5Jrc5j3BcOt waHwy1WNK+lyVnJcJUAvYPORdtYcDdqtB5DsO43GHNKGc/HfRyy3fjVPJhjcymx5FpsN lWpw== X-Gm-Message-State: AJIora8nHiLEJhKPSOMnLfUd3hjXhkxfb/WFpfbk+dSZ4tr5ug7JzF1u yuDNPH5UFpdJpLQYrupAkTU= X-Google-Smtp-Source: AGRyM1vB3VFhiom8jkpW4e6UTIVeIzt0Pz8wsk226p51b5/Jq7B5HtkB3qywT7jn0oiJaMyu8jT7bg== X-Received: by 2002:a05:600c:198f:b0:3a3:2dd5:8e35 with SMTP id t15-20020a05600c198f00b003a32dd58e35mr10478646wmq.121.1659347214751; Mon, 01 Aug 2022 02:46:54 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h6-20020a05600c350600b003a38606385esm20266085wmq.3.2022.08.01.02.46.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Aug 2022 02:46:54 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:238397 Archived-At: On 01.08.2022 12:34, Gregory Heytings wrote: > > Given your and Dmitry's feedback, I just tried to add an explicit call > to (syntax-ppss (point-max)), without narrowing, when the buffer is > opened (see below). > > The problem is that this is, as I said, slow.  On my laptop, opening a 1 > GB file takes about 6 seconds.  The call to syntax-ppss adds 70 seconds, > so opening a large file becomes an order of magnitude slower (13 times > slower).  Which I think is too much for the added benefit. But that only has to happen when the buffer is scrolled to the bottom, right? And syntax-ppss's speed depends on the rules applied by the particular major mode. Those could be sped up. Some optimization of this function's speed is not out of the question either.