Hansen Martin <F32144(a)danfoss.com> wrote:
Tanks for the fine answer. Could you please tell me in short terms or
give a
pointer what lazy lock is all about?
Lazy lock is one method used to do syntax highlighting. Basically,
doing syntax highlighting (using different fonts and colors when editing
source code) is often expensive. The bigger the source file, the longer
it takes to do syntax highlighting.
To make syntax highlighting appear "quickly", various methods have
been developed. Lazy-lock is one of them. Basically, with lazy-lock,
only that part of the source file actually visible is highlighted; the
rest of the file is not (initially) highlighted. If you move around in
the file, only those parts that are seen get highlighted. You can think
of it as highlighting-upon-demand. However, you may have noticed that
there can be a short pause as the highlighting is done (with the result
that the area viewed is briefly unhighlighted then highlighted).
Because of this, a further optimization was done: if the user (you) is
not doing anything, any unhighlighted parts of the file get highlighted,
in chunks, "in the background". This can result in brief (or not-so-
brief) periods in which XEmacs uses up a lot of CPU time when "idle"
(basically, if you don't do anything with XEmacs for some period of time
-- something like 10-20+ seconds -- lazy-lock thinks that you've gone
away, and starts highlighting the parts of the file that haven't yet
been highlighted). If you start doing something with XEmacs while the
"background highlighting" is going on, lazy-lock immediately shuts down
(and will resume, if necessary, when XEmacs again becomes "idle").
--
Darryl Okahata
darrylo(a)soco.agilent.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.