From xemacs-m  Tue Feb 25 05:54:22 1997
Received: from pat.idt.unit.no (0@pat.idt.unit.no [129.241.103.5])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id FAA03020
	for <xemacs-beta@xemacs.org>; Tue, 25 Feb 1997 05:54:21 -0600 (CST)
Received: from ynde.idt.unit.no (1466@ynde.idt.unit.no [129.241.200.28])
	by pat.idt.unit.no (8.8.5/8.8.5) with ESMTP id MAA00202
	for <xemacs-beta@xemacs.org>; Tue, 25 Feb 1997 12:54:18 +0100 (MET)
Received: (from palat@localhost)
	by ynde.idt.unit.no (8.8.5/8.8.5) id MAA11014;
	Tue, 25 Feb 1997 12:54:15 +0100 (MET)
Sender: Sudeep.Palat@item.ntnu.no
To: XEmacs Beta <xemacs-beta@xemacs.org>
Subject: Re: lazy lock cpu usage
References: <9702251110.AA15412@mail.esrin.esa.it>
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
From: Sudeep Kumar Palat <Sudeep.Palat@item.ntnu.no>
Date: 25 Feb 1997 12:54:14 +0100
In-Reply-To: Simon Marshall's message of Tue, 25 Feb 97 11:10:41 GMT
Message-ID: <yv97mjxgkyh.fsf@ynde.idt.unit.no>
Lines: 43
X-Mailer: Gnus v5.4.15/XEmacs 20.1

>>>>> "Simon" == Simon Marshall <Simon.Marshall@esrin.esa.it> writes:

    Sudeep> Start xemacs -q and load a large file, for e.g., gnus.el.
    Sudeep> Turn on font lock.  Hold down the cursor key and look at
    Sudeep> cpu usage (I used top).  When the buffer has scrolled down
    Sudeep> 20%, the cpu usage by XEmacs is about 14% (it keeps
    Sudeep> increasing, presumably because, XEmacs is unable to
    Sudeep> process the key input at the keyboard repeat rate).

    Simon> So with Font Lock mode and without Lazy Lock mode has a
    Simon> dramatic slowdown?

    Sudeep> Slowdown in the cpu usage.  Meaning lazy lock takes more
    Sudeep> CPU cycles.

    Simon> No, I said *without* Lazy Lock mode.

    Simon> Do you find that turning on Font Lock mode but *not* Lazy
    Simon> Lock mode also causes a slowdown when you C-n?  This is
    Simon> what you suggest, since later on you had suggested that it
    Simon> gets worse if Lazy Lock mode is also on.

    Simon> The difference is important, because nothing should be
    Simon> happening as you C-n when Lazy Lock mode is *not* on, other
    Simon> than redisplay.  If there is a redisplay slowdown, it will
    Simon> of course be a factor in the (worse) slowdown when Lazy
    Simon> Lock mode *is* on.
Yes, of course turning on lazy-lock will take more CPU cycles to
scroll down compared to font-lock without it.  Silly me, didn't think
of it.  With just font-lock on, there is _no_ increase in CPU usage
while scrolling.

Anyway to get it all straight, holding down C-n gives (CPU %
usage for the different cases):

With out font-lock:  13%
With font-lock:      14%  (without lazy-lock)
With lazy-lock:      17% (with lazy-lock-hide-invisible nil)
With lazy-lock:      50% (with lazy-lock-hide-invisible t) - the default

These are after lazy-lock has finished fontifying stealthily.

sudeep

