[Top][All Lists]

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

Re: What is the _essential_ difference between lazy-lock and jit-lock?

From: Eli Zaretskii
Subject: Re: What is the _essential_ difference between lazy-lock and jit-lock?
Date: 27 Jan 2004 09:42:04 +0200

> From: Alan Mackenzie<address@hidden>
> Newsgroups: gnu.emacs.help
> Date: Mon, 26 Jan 2004 17:53:46 +0000
> > Sorry, no.  And the changes were not in jit-lock.el per se, IIRC, but
> > rather in the font-lock definitions of several modes.
> Hmmm.  Font lock definitions are (usually) just data.  It seems a bit
> strange to blame data for hanging a program, rather than the program for
> not handling the data.

The program does handle the data, it just takes a long time and lots
of CPU power to do it.

> Were you thinking of "ambiguous" regexps, whose
> runtime can explode exponentially w.r.t. the length of the string they're
> examining?

IIRC, one problem was that font-lock definitions forced Emacs to scan
large portions of the buffer in order to decide how to fontify.  When
such scans need to be done backwards for every word, it could take a
lot of CPU cycles.

> For the record, the modes I had loaded when I reported the bug in October
> 2002 were:  C and AWK (both CC Mode 5.28, a released version), Emacs Lisp
> (and Lisp Interaction), Info, Diff, Shell Script, and Fundamental.  Since
> then, C and AWK font lock settings have been entirely rewritten.  Of the
> other modes in this list, were any of them amongst those whose font lock
> definitions were rewritten?

I don't really know ("cvs annotate" should tell you, right?), but
Shell Script mode sounds like a good candidate.

reply via email to

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