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.devel Subject: Re: How the long-lines "optimisation" breaks font locking. Date: Fri, 5 Aug 2022 17:29:46 +0300 Message-ID: <12edd1f1-e073-689b-cc94-22cabca40352@yandex.ru> References: <87y1w5tahv.fsf@gnus.org> <83sfmc2mph.fsf@gnu.org> <837d3n0we0.fsf@gnu.org> <71604574-d7e7-306f-bbc7-b60461737d6e@yandex.ru> <83pmhezs61.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="29487"; 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: acm@muc.de, larsi@gnus.org, emacs-devel@gnu.org, gregory@heytings.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 05 16:31:30 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oJyML-0007W8-PW for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Aug 2022 16:31:29 +0200 Original-Received: from localhost ([::1]:35356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJyMK-00028N-Hz for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Aug 2022 10:31:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJyL3-0001GX-So for emacs-devel@gnu.org; Fri, 05 Aug 2022 10:30:09 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:41594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJyL1-0007PH-RN; Fri, 05 Aug 2022 10:30:09 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id p10so3439669wru.8; Fri, 05 Aug 2022 07:29:50 -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=WPWaY3La5CazOr3vJXxtKUkt6dIub57ecgUjP/+nH6c=; b=WvffbS3LLuthwFO14/xcby/d9aV5hWA8HS0Cd+ipQSXTUnHY+JodGwE6pbry3qh1bF POmfKRHrKGbs416SKwRhIFEKPCxXlMIkrOUDmPF3lCvAy2zGnojvLZv3WqeVQfNaGszM q7HRlzLtfZTOaYMgPflVXNtoV3mJXXhPTVynyPYB6qjhgOEa4PfisdjbLHlayDlFPjxo PSPkojIZtQHoqCPlwNt5zIIr15NZ/7L8+SlXcq4TPUdtHJ8K4O4tsUBtSLkD9MZoCvU0 ApXTso4Crv7NsJCECK9gBmRdJTJtStMQRxJjUGJZObhAMBtRmWYM2tOlJnXQ+hEQRC6C ccFw== 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=WPWaY3La5CazOr3vJXxtKUkt6dIub57ecgUjP/+nH6c=; b=xpE6j/3oz4Dzyn9lYYGw4mtLGWGYhNF7IuJhoyqk0z2qkrC7cneiYZfw8DMcnNj3xD 9mJywBcSfySZbpoY+kVjSJCpGhRHMEgoMFAHxfegRt1Nba6wxYkv6t9yHBy0wT6BHO6C SQuRc7sjjbQzlIYiOg6AcpePvcJxhX3jDketqtyENxUHbfSFv2XK8Rnfv6RWRSUBDzXc YjdAwpT7kPsxhg7KWvIWbWsw4dZkh0571tZcWkkOcLsDKn+uz/lppcZUplZvFJfPhvSE T1glBJPO2yQpt2EKmqiXvzLsq2SDbsX5Ogxvydw40Q/sV1Hrf6W+ClfcEPcNIvdqzWvO rELA== X-Gm-Message-State: ACgBeo0LhNET5UIP+m3edIUp5uaeklg/PooDl+7G5JMKaa+8/+uztObo 4TyD0T+LkWr/ZQ6cIy/Ni9d6KtSu+rg= X-Google-Smtp-Source: AA6agR7SQbIcY6kPIMTjmnJw3angBTI4fZF0e9SHtXe21QP8Oa+YbneFWgOidBeXmY5tU/kcvsjrxg== X-Received: by 2002:a5d:6c65:0:b0:21d:b7c0:9930 with SMTP id r5-20020a5d6c65000000b0021db7c09930mr4413431wrz.500.1659709788843; Fri, 05 Aug 2022 07:29:48 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e39-20020a5d5967000000b002205cbc1c74sm4046119wri.101.2022.08.05.07.29.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Aug 2022 07:29:48 -0700 (PDT) Content-Language: en-US In-Reply-To: <83pmhezs61.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=raaahh@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293116 Archived-At: On 05.08.2022 17:22, Eli Zaretskii wrote: >> Date: Fri, 5 Aug 2022 16:04:08 +0300 >> Cc:larsi@gnus.org,emacs-devel@gnu.org,gregory@heytings.org >> From: Dmitry Gutov >> >> On 05.08.2022 14:20, Eli Zaretskii wrote: >>> Thanks. Any improvements in font-lock of any major mode is welcome. >>> If/when enough of them get their act together, we might revisit the >>> default value of long-line-threshold, as I already said many times. >> As I said, changing long-line-threshold's default is not the solution >> because this variable also determines when the fixes for the other >> redisplay logic come into play. >> >> And those cause sluggishness more extensively and much earlier than >> font-lock becomes a problem. > That's incorrect, or at least inaccurate: part of slow redisplay is > due to the fact that we fontify as part of displaying or as part of > layout calculations. The slow part I'm referring to is not in font-lock's code, nor in CC Mode's font-lock rules. So it can be "fixed" independently. Because while it's still there, it makes debugging and optimizing font-lock code and major modes's font-lock rules harder.