Subject: Re: bug#56682: Fix the long lines font locking related slowdowns

From: Gregory Heytings <[email-masked]>
Date: Mon, 15 Aug 2022 09:11:16 +0000

>
> 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?