From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Mon, 15 Aug 2022 09:11:16 +0000 Message-ID: <3a1232a17bf48a4a693e@heytings.org> References: <83mtcgy44k.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12330"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier , Dmitry Gutov To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 11:17:43 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 1oNWEB-0002yj-Av for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 11:17:43 +0200 Original-Received: from localhost ([::1]:41700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNWE9-0002UN-Lw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 05:17:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNW8h-0006Yj-7x for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 05:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNW8f-0001hJ-WE for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 05:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNW8f-0006qV-QL for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 05:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 09:12:01 +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.166055467926263 (code B ref 56682); Mon, 15 Aug 2022 09:12:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 09:11:19 +0000 Original-Received: from localhost ([127.0.0.1]:40856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNW7z-0006pX-1c for submit@debbugs.gnu.org; Mon, 15 Aug 2022 05:11:19 -0400 Original-Received: from heytings.org ([95.142.160.155]:53930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNW7x-0006pO-4e for 56682@debbugs.gnu.org; Mon, 15 Aug 2022 05:11:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660554676; bh=O5Cd2GXPaNLRb/5AF82jzBUtmcJteKBI24tnMbpsp2I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=m4FXc5zAQeyTCuUhC3F8dv8g41GyJeigs5WX3+EiOqdOgpWTNyVRXcFt3c9Ju9LzZ NZExQz56uA8aGNPWnnuf1MhkGN6z2GBJT5UpO4eKZCR8C8FtD0GapKm1ZkyNVRz7zL wrQh1stAJogpUCjmPuhqnpnMoDO5zYbiT/Q9TsaHOW+eyYzsHX9XAJ6CdrWHGVDDKd MzsN+D+2SvfCDz4mpUgPPAfGbbaF3rpXlLTaw/nPvwF6dnmRnD04ThVophPjIbt5Vs s8ZJgZRGXjcJ3eHw50pL1+EjANdcibqQU1jBqKJ6/sUP5cmQfKCnqU23eJBCkU+iS3 LjRawfX2E6uhA== In-Reply-To: <87mtc6yzfv.fsf@localhost> 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:239760 Archived-At: > > Further, Org parser is caching parse results and reuse them to not > re-parse on every invocation. The need to maintain separate parser > caches for every possible narrowing state will be a nightmare. > Especially considering the user narrowing may also be an option and > having a different parser/command behaviour will be unexpected to the > user. > I'm not sure I correctly understand what you mean, but it seems to me that the fact that the Org parser caches its results implies that Org doesn't need to access the whole buffer to make "local" decisions. It can use the data in cache for everything that is outside of the current narrowing, and update the portion of the cache corresponding to the current narrowing. IOW, there is no need to maintain separate parser caches for each possible narrowing state. Am I misunderstanding something?