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: Fri, 5 Aug 2022 15:59:57 +0300 Message-ID: <64084296-1953-8ef8-5938-adfb6fb9b43f@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> <8c7321f2f36494299e61@heytings.org> <83v8rc2n1h.fsf@gnu.org> 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="31489"; 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, gregory@heytings.org To: Eli Zaretskii , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 15:02:34 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 1oJwyI-0007ta-Jb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 15:02:34 +0200 Original-Received: from localhost ([::1]:42840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJwyH-00012H-CW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 09:02:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJwwo-0000pz-Gd for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 09:01:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJwwo-0005qg-85 for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 09:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJwwo-00014N-39 for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 09:01: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: Fri, 05 Aug 2022 13:01: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.16597044083940 (code B ref 56682); Fri, 05 Aug 2022 13:01:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 5 Aug 2022 13:00:08 +0000 Original-Received: from localhost ([127.0.0.1]:56666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJwvv-00011T-LN for submit@debbugs.gnu.org; Fri, 05 Aug 2022 09:00:07 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:53971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJwvt-0000zm-U5 for 56682@debbugs.gnu.org; Fri, 05 Aug 2022 09:00:06 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id a11so1383266wmq.3 for <56682@debbugs.gnu.org>; Fri, 05 Aug 2022 06:00:05 -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=dAwFFV5wfBAxBM00wSR3+z/Knjc5m4nGk46dcCj22m0=; b=mY0Mi6/JqYYSmQka8sRilvT71/uulRTAGwzd68w5ZZl4hC8GLUxbGBhz/yuTkL1lJe YyoRgU072qVxJw8rRNI0DACDohfJv9wKE5Jl3LZKnIkx4bhZKkRgTfpb5YJdE/uBOePG 4uhqrnoCl2OC10XLhNSboLjMQwQ6UES1mNejZc34cf5lNnEodqj24jEiGXsmH6ts7P1Y ULK0V9Eh25t5YQtB9WRq5haYZFzpfKAYC9z6LoxGijUdlT40GEQdCZ/lG+vkHhXKPtVJ zXRIt91nye67rcOrIGiU0gYvrHlRcnbrcKfdwrRVHogh5jt8O6eF/S0+aW+z+sPrJZCe NKyA== 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=dAwFFV5wfBAxBM00wSR3+z/Knjc5m4nGk46dcCj22m0=; b=lzMqDXyZmTsfQfOfkCnBMtBxHimsiciSvi1CTTBnjCn+do+DSTJLNfeMTMWQMsAy6H n1rS6u2LDF6B4SmIa/cIKfSv2NgCreNnL6qIFAyiTQckkOokeOZfKNhA6MoNd13yC5mF IapB9+UPK7tzt7Ro+TS5mbUJEbIhrk/7rbiPv4RP9f2C72i+/jt+yW1Ofn6iX8F99Ixz SCoYm26dNPL2Ow4xeCpZXFvO3fMCf+JLnADT6ZXn5BmlH1hNjtHZG1yyoRIX4WwC8YG5 sTpGLfONCQ9c/3EJllPt4/6jFtR4BJVqVCAHssULE+lKKsV2yMDVhS64jPqM6QBkqPXu lJyA== X-Gm-Message-State: ACgBeo0wjs198eSuDv1kVPcyg9glWIr/TL7djts5aey4ifIvtKv13Lgk MljuIgtChYnIPywJNnR4Yd0= X-Google-Smtp-Source: AA6agR5+zxBIP6OnkQpL5FGzHjf80JuIs6LvKERLnx0bHMEMpQEY3CxrPKiRWyPSLo3Q5s+6SBWZog== X-Received: by 2002:a05:600c:4fc5:b0:3a3:2d73:c147 with SMTP id o5-20020a05600c4fc500b003a32d73c147mr9470492wmq.197.1659704400025; Fri, 05 Aug 2022 06:00:00 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e5-20020a056000120500b002207a0b93b4sm4708259wrx.49.2022.08.05.05.59.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Aug 2022 05:59:59 -0700 (PDT) Content-Language: en-US In-Reply-To: <83v8rc2n1h.fsf@gnu.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:238906 Archived-At: On 01.08.2022 14:58, Eli Zaretskii wrote: > As I wrote elsewhere, I'm okay with extending 'widen' so that it could > "unlock" the locked narrowing, which could then be used in major modes > that convince us their performance is adequate (or clearly announce in > their docs that they don't care about files with long lines ;-). And to address the idea of "unlocking" the narrowing: I think I have demonstrated that the remaining slowdown can be caused purely by the length of the buffer and how long 'parse-partial-sexp' takes to parse it. That part doesn't have much to do with individual modes. And of course the more, let's say, *complex* modes like CC Mode will opt for unlocking narrowing right away because its font-lock logic has to jump around to previously-saved positions in its syntax cache, which will inevitably spam errors here and there when those positions are not accessible.