[Top][All Lists]

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

Re: Q on performance with 10000 faces

From: Stefan Monnier
Subject: Re: Q on performance with 10000 faces
Date: Mon, 22 May 2006 08:59:13 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> Does this mean that Emacs cannot reasonably be expected to
>> display 10000 face text-properties?

>     AFAIK, yes.  Doing what you did (a) disables all possible display
>     optimizations that the redisplay engine has up its sleeve to speed up
>     the common cases,

Indeed, changes in the face property take time.  I wouldn't say that what
he describes disables any particular optimization, but it makes
them ineffective.

>     and (b) forces Emacs to traverse the 10000 text
>     properties for each character it is about to display.

I don't see why the redisplay would have to traverse 10000 text properties
for each char it is about to display.  After all, there are 10000 chars each
with a different face property, but each one only has one text property (or
maybe a couple, but not 10000).

> Don't do what? Use that many faces or something else also?

It could be either don't use that many face-changes, or don't use that
many faces.  I suspect that the number of faces is what bogs you down which
is why it also slows down redisplay of other windows.  But I'm very
non-knowledgeable about the redisplay code.

>     It's because even cursor motion, that usually takes a fast shortcut
>     through the redisplay code, requires to search all the text properties
>     in your situation.

I don't see why that'd be the case.

> I'm a little surprised that a frame that is not selected and has no current
> activity (no cursor motion etc.), would continue to slow Emacs down just by
> being displayed on the computer screen (and listening for input).

Agreed.  I think there is a missing redisplay optimization here (and
I suspect that I sometimes suffer from a related missing optimization when
I have 100 frames open).


reply via email to

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