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: Tue, 16 Aug 2022 18:52:42 +0800 Message-ID: <87bksk31fp.fsf@localhost> References: <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> <87h72d4slv.fsf@localhost> <87tu6czu4y.fsf@localhost> <325f95fd2b9c25a9047f@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18095"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier , Dmitry Gutov To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 16 12:52:24 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 1oNuBM-0004T6-8b for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 12:52:24 +0200 Original-Received: from localhost ([::1]:33814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNuBL-0002zw-5r for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 06:52:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNuB0-0002xy-Ta for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 06:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNuB0-0003Zw-Jf for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 06:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNuB0-0003UX-DH for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 06:52: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: Tue, 16 Aug 2022 10:52: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.166064710813399 (code B ref 56682); Tue, 16 Aug 2022 10:52:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 16 Aug 2022 10:51:48 +0000 Original-Received: from localhost ([127.0.0.1]:45061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNuAl-0003U3-Tx for submit@debbugs.gnu.org; Tue, 16 Aug 2022 06:51:48 -0400 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:42906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNuAj-0003Tq-EM for 56682@debbugs.gnu.org; Tue, 16 Aug 2022 06:51:46 -0400 Original-Received: by mail-pl1-f178.google.com with SMTP id w14so8846471plp.9 for <56682@debbugs.gnu.org>; Tue, 16 Aug 2022 03:51:45 -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=/RDzg7+log2mbwVWjwqLFudqv/DOLRMIqC/JpTouIEU=; b=S/70LW12tbWllaPz0FPknl9C9UwTnK/FzRzFHk+77Yqx7wYxoXutTUgmosJrW7TjBr F5BabDQd+F1wKDL231G+E4jizhQOCyeCnIomuep025qrb0y7FMv8Y65mUZfXvXWDXrbR nCKnOjQVNk5lHGAnSzrnJCkbpImqtdExmbSo7wvoXxlOQQVeOLzVKs7k2mLQrP13XoZq FKy6xJPDCCgsUz7jHryPxXODCnsEuiizNGztqB6y4Hzmngi3x/XeawXTNwZYyMzgaH4q xQNt4lgW87wUDaCYPSYMVVWK35uvACxrsjJfWLZMa2bfbJwMyKXPM+nOKOg5s9/HG95d LVdg== 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=/RDzg7+log2mbwVWjwqLFudqv/DOLRMIqC/JpTouIEU=; b=GpWKCKss4+TNNMD6DX7bzGXEjiCoQet0sBGWonN1vRyXLeZKQDjyiaFcPX4YW4wzbq PXWwRJRGPWw+I8CQb+X3CoL9at7vpTX36QdtSxejfm7YnELjHI1JQ3NmZWekJnuVm9V3 9zqm2L9lsOe3pSRs2KIKyrQqCgSQ012NvwxnF0hjgkDjfgaW2bmKXmVtUsJFSew5EjdO MYBiRxKNp8A3+0JBcjWTCwP1ZNQY57ZfscsC2lMt51C1if7ocNRqS2GbHm9yhpnWt1di Ya/O7u2I074QpuAcrmtFr62MYoiIvh7TbI2ns9Cag+4Lo+38NmBJfNzwWUyYKisk9Kms SXfQ== X-Gm-Message-State: ACgBeo33GlDrdqEtG18pPtnG5ivkSRWR51KWutJ3JXnl6AlsgkpgQfP7 kCpWFQK90esHQ9j8fjMwpps= X-Google-Smtp-Source: AA6agR4aKsvlldreHhd77gKCzkEUfOe+LW17LL1MCylZSz8EWHIorwpK/c6vv0QzQ3QM+wdmlZiVXQ== X-Received: by 2002:a17:90b:4c0b:b0:1f5:b72:3b0b with SMTP id na11-20020a17090b4c0b00b001f50b723b0bmr31829046pjb.227.1660647098546; Tue, 16 Aug 2022 03:51:38 -0700 (PDT) Original-Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id k26-20020aa7973a000000b0052d748498edsm8357682pfg.13.2022.08.16.03.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 03:51:37 -0700 (PDT) In-Reply-To: <325f95fd2b9c25a9047f@heytings.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:239892 Archived-At: Gregory Heytings writes: >> `org-indent-line' (the value of `indent-line-function' in Org mode) does >> require invoking parser in order to determine the syntactic object at >> point, which, in turn, needs to consider the full buffer contents. This >> is prescribed by Org syntax. We cannot avoid this. >> > > Do you really mean that there is no way to avoid invoking the parser on > the whole buffer, and to possibly process 20 MB of data, when > org-indent-line is called? In the worst-case scenario, yes. However, it is usually not the case. org-indent-line usually needs to look no further than the parent headline - a few lines above in the majority of Org documents. -- 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