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: Tue, 2 Aug 2022 17:29:47 +0300 Message-ID: <06c5560d-3009-e5a5-3d33-fe5d2ec32d6b@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> <8c7321f2f336523624e3@heytings.org> <83r1202meh.fsf@gnu.org> <6020ffaf-9069-0070-76cf-a13379ef01b5@yandex.ru> <83les71ilg.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="328"; 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, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 16:30:11 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 1oIsuQ-000AUV-UR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 16:30:10 +0200 Original-Received: from localhost ([::1]:51470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsuP-0000x1-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 10:30:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIsuI-0000wh-FD for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIsuI-0002wX-5k for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIsuI-000876-1Q for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:30: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: Tue, 02 Aug 2022 14:30: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.165945059731149 (code B ref 56682); Tue, 02 Aug 2022 14:30:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Aug 2022 14:29:57 +0000 Original-Received: from localhost ([127.0.0.1]:44661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIsuD-00086L-9K for submit@debbugs.gnu.org; Tue, 02 Aug 2022 10:29:57 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:33715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIsuA-000868-P5 for 56682@debbugs.gnu.org; Tue, 02 Aug 2022 10:29:55 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id v3so17207270wrp.0 for <56682@debbugs.gnu.org>; Tue, 02 Aug 2022 07:29:54 -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=vL+qgdETQ2/CTcigR36J9/T1DLxB76nLs0dg2NZBfv8=; b=pRsC00nOkred4US5mguP6obz2u9yOboZFNYGOfrVd7+IOuR4F1O/t5FwelXxdK88li Q73w0BJ6jZr2jIOVxAVYQzttw0cDpNvaVBHgujmi/p+1WanVgPs7E7maM5/uxMVDQ+h1 Gndz6dGHwp/TH2ipfCWCgrghJk/kLTGvCEqjYw2WFk0lslJ//vZMtHIU26g8h1iGe2S7 5zxgQ/NxSOauPGaTJh1DugMpI87wbIJGYjbaYUq6GbvYgtaT3LgP4/9UF70QPDQrowyH XVn9nTE2yQUXRACbCwP7sewufRDdsyoZHqsoG2m4s+0WoyjEFrBluQRd7wr8jysKQMhd c1Ng== 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=vL+qgdETQ2/CTcigR36J9/T1DLxB76nLs0dg2NZBfv8=; b=afKBlDF1QlpV5S02PNn42Hg3vfzJx2nJAIsset+CPtTf2ts08LCcJHRLQ+SxA6B8Ii DNjfHnDGKAhw/KIdcCd/PKpnPTpAlxsi9ENTiRoH6zhVjP47j0w2SMhjdDDcQ1IaDZG4 crDqbgm+r9VeyTCv9CRyXL9qI3UsFb7DSJMlLZVft7PS9P/I5LB58M5edKptsUR5WSO1 G+aMzd2t9/m4zWcFBp26u3ZwJyeYZhKTVNX6RrB8qOjNlliEgDI/n5hqmlsTqSs8OLQv VdDNSz5hBhkYhcFw1yAneJIhGp71RcGUxTb/CNd+RsrSC3xuYwqc8pdKyqOCZGo5p2YQ FKVQ== X-Gm-Message-State: ACgBeo38Dmh5BSnjq7RArToWQeaNb32y1r+omrsRimhFzgCN7Kou2xf4 PAIpxjbFAmdKitf4wxy4ufo= X-Google-Smtp-Source: AA6agR4XH5Q8ziZCai/OQUNkJY3GvQy+wtMBfjR5iTzBPnT0ebdlF9tRoqoPwtgjNaHSE/AbNloz/g== X-Received: by 2002:a5d:6da7:0:b0:220:7717:f587 with SMTP id u7-20020a5d6da7000000b002207717f587mr849952wrs.204.1659450588855; Tue, 02 Aug 2022 07:29:48 -0700 (PDT) Original-Received: from [192.168.0.215] (buscust41-118.static.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id w13-20020adfee4d000000b0021f0af83142sm14868993wro.91.2022.08.02.07.29.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Aug 2022 07:29:48 -0700 (PDT) Content-Language: en-US In-Reply-To: <83les71ilg.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:238557 Archived-At: On 02.08.2022 05:31, Eli Zaretskii wrote: >> Just like we do in such cases where an Emacs feature is not optimized >> enough for a given use case: wait for the user to realize the situation >> can and should be improved, and file a bug report/feature request. > The intent of this activity is to make Emacs reasonably performant and > responsive in the relevant use cases without asking them to wait for > something that likely won't happen. > > IOW, in this case the Emacs developers, due to long-standing bug > reports about this situation, recognized that it_can_ be improved, > albeit in slightly unorthodox ways, and have taken the measures to > optimize Emacs for the users. It would be a shame to have the better-behaving (faster) major modes exhibit worse behavior that they could have because of the approach we choose to solve the long-lines problem. Regarding the long-standing bug reports, we did solve a bunch of issues already. One major one, IIUC, was redisplay of already fontified text on long lines. Another piece of the puzzle was added by Stefan in 15b2138719b340. So perhaps we should re-evaluate the testing scenario to see where the current bottlenecks are. If we current main issue is the 55s spent in syntax-ppss, a more constructive approach would be to look into optimizing parse-partial-sexp. Or even give up on certain scenarios, admitting that waiting 55s once to visit the end of a 1 GB buffer is not so bad (and that could part could also be sped up by setting syntax-propertize-function to nil and using a very simple syntax table, for instance).