From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Mon, 15 Aug 2022 20:08:12 +0800 Message-ID: <87h72d4slv.fsf@localhost> References: <83k07jx5jn.fsf@gnu.org> <866e510d-a060-7daa-d002-97861d056fa7@yandex.ru> <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> <66bbbb95983414e79637@heytings.org> <83wnbckp0q.fsf@gnu.org> <8e884ebe-2d2e-d599-15c3-a5cfe5e6b295@yandex.ru> <83o7wnl7ok.fsf@gnu.org> <036414cc-c711-efaf-ed5b-f8ccfaca0604@yandex.ru> <5900f20836753183a6ac@heytings.org> <5c22e38a-5dcd-860e-28a0-b4a5ede6a21b@yandex.ru> <877d3awb92.fsf@localhost> <87pmh2z277.fsf@localhost> <87mtc6yzfv.fsf@localhost> <6be37aac-f305-16e0-b856-6884108f940e@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Gregory Heytings , Eli Zaretskii , Stefan Monnier To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 14:09:08 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 1oNYu3-00087G-Ed for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 14:09:07 +0200 Original-Received: from localhost ([::1]:38630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNYu2-000059-FF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 08:09:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYt1-0007qj-NV for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:08:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNYt0-0005dy-7r for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNYt0-0007UC-3l for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 12:08: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.166056524528731 (code B ref 56682); Mon, 15 Aug 2022 12:08:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 12:07:25 +0000 Original-Received: from localhost ([127.0.0.1]:41117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYsP-0007TL-9g for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:07:25 -0400 Original-Received: from mail-pf1-f174.google.com ([209.85.210.174]:43718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYsN-0007T8-8w for 56682@debbugs.gnu.org; Mon, 15 Aug 2022 08:07:23 -0400 Original-Received: by mail-pf1-f174.google.com with SMTP id u133so6461976pfc.10 for <56682@debbugs.gnu.org>; Mon, 15 Aug 2022 05:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=7CNi9oExu8/C4hBvO5yDN3Ed8toJ4mp7GavbmLVvLRs=; b=WZc34/0nuQ2iOcy42i0I4r7dgOVTgt3o4j5RXbp8/K7eIU83Hxzddy5ynGqcHCyLwM Tv64/jknRMHoYQDTPScAEmHpnUPSnHBMw6S89WbSrkKyQA52QndUevZiA+V8882cjcXS LJHdCSrCTBF0YS+L/4NpZn0UPGGsjcc6sYESWzWoMIlkl3/x3XKeZ7shnGeZiO7ylVom 7KM9GRcoxkdamRskzLGxX4w5YAMMQBhWcIS/Vtnjm4lvWnd+YAdDhQWdfTJbQWjSC1QU HONU1HfAqJgAwUvtyEppyCCrVpCmBTjwmXPQdEC1e/HUU/2yQ2oLOhKBsQG5HMXOyxm9 n85Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=7CNi9oExu8/C4hBvO5yDN3Ed8toJ4mp7GavbmLVvLRs=; b=JcthI6IQybuEKJmOEE+fPelEFFA/xXoSp8xKH1EqHqQkMT/RqRzif1DiXjDx0pH1x+ rReCIRBPTmaJVoJAHxs0nbD3s6AWOkuC4gu0FWRT75XVVxqk7rqgJLzMNCT/mLm7LOFi v1umTYkzSufFPqirHMik7pdvm+49ykvIBHm5W4S3MSLtgfWqSA+8dbArbjBKV5J3povw con/7MdEPXqbFj7FU57UL+ED63vPxbv74BXw8Ae8STfjU8McUM0EQc/QVFjgTrXZlA+V c+UoNXqrGx3+RgXIrXg7nMleSrz09egA6bv09OVptOfEzwu9R7DExomYrbvIcXsMguVz BEWw== X-Gm-Message-State: ACgBeo2vX25Vd0PnVXxRpVGOksVgCZj0Bpk4TKkzIOuEzlXbWQF594iG jaQB4j9KLlhE+29+POiFRbc= X-Google-Smtp-Source: AA6agR4YmVl+6KjOSimvRiGd16RHKxDhdxXTdjKadbw4histoETsYEYzcLCC83LDu7j7PO6fZ5zntg== X-Received: by 2002:a63:cf0b:0:b0:419:f140:2876 with SMTP id j11-20020a63cf0b000000b00419f1402876mr13394941pgg.303.1660565237451; Mon, 15 Aug 2022 05:07:17 -0700 (PDT) Original-Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id o5-20020a170902d4c500b0016d6963cb12sm6873490plg.304.2022.08.15.05.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 05:07:16 -0700 (PDT) In-Reply-To: <6be37aac-f305-16e0-b856-6884108f940e@yandex.ru> 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:239787 Archived-At: Dmitry Gutov writes: > On 15.08.2022 06:10, Ihor Radchenko wrote: >> The fact that MMM-mode is relying on narrowing is a bug in MMM-mode. >> Polymode (an alternative to MMM-mode) is using a different approach. > > Does it really? > > From what I see, Polymode does use narrowing: > https://github.com/polymode/polymode/search?q=narrow&type=code > But it also contains provisions for modes whose syntax highlighting > cannot function with it. With different tradeoffs. AFAIK, it allows running commands across multiple chunks of the same foreign mode. In any case, do not take my word on this. I have been studying MMM-mode and polymode years back. However, I do insist on my statement that expecting major-mode to not widen is a bug. There are valid cases when a major mode needs to examine the whole buffer. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92