[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] overlay prompting

From: Mosè Giordano
Subject: Re: [AUCTeX] overlay prompting
Date: Wed, 2 Mar 2016 01:06:49 +0100

Hi Vincent,
> One more idea is the following : my speculation is that AUCTeX is slow 
> because when you do (verbatim-p) or something like that in the code patch you 
> will regexp search backward and forward, so if S is the size of the file to 
> scan, you need to scan over potentially S^2 characters instead of S because 
> of the secondary search. Maybe it would be possible to make the code more 
> efficient by scanning for \begin and \end commands at the same time as 
> \documentclass and \usepackage, placing the search result into some variable 
> and then using the search results to make it all.

You're right, the bottleneck in `LaTeX-verbatim-p' is
`LaTeX-current-environment' which performs multiple searches, but is
also capable to determine outer environments than the innermost one.
We could use a simpler version just for `LaTeX-verbatim-p' (we do need
the innermost environment there), though I'm not sure doing the whole
search in one shot would improve performance, but I didn't test.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]