emacs-devel
[Top][All Lists]
Advanced

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

Re: Stealth fontification GCs a lot


From: Ralf Angeli
Subject: Re: Stealth fontification GCs a lot
Date: Thu, 14 Apr 2005 18:53:40 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (berkeley-unix)

* Richard Stallman (2005-04-14) writes:

>     But I see your point and I'll check if forcing the whole buffer to be
>     fontified before folding leads to bearable execution times.
>
> If it is too slow, here's another possible idea: explicitly handle
> precisely and only the part of fontification that is needed for the
> other features to work.  That might be substantially faster.

Hm, I don't see an easy way to determine such a subset.  A possibility
could be to call `font-lock-fontify-region' only on the regions to be
folded.  But this may lead to wrong results in case there are
constructs enclosing such regions which would influence fontification.

I already commited a patch to AUCTeX's CVS.  The function responsible
for folding a buffer now calls `jit-lock-fontify-now' in case
jit-lock-mode is active and the function is available.  In the tests I
did, the increase of execution time for folding a buffer was barely
noticeable.  In case people will have problems with it, there is a
switch to inhibit forced fontification.

Thanks for your suggestions.

-- 
Ralf




reply via email to

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