[Top][All Lists]

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

Re: redisplay system of emacs

From: Miles Bader
Subject: Re: redisplay system of emacs
Date: Fri, 29 Jan 2010 20:03:47 +0900

Lennart Borgman <address@hidden> writes:
>> Uh, Emacs needs to work without noticeable delays and with syntax
>> highlighting for documents of _book_ size, easily containing thousands
>> of pages.
> Is this necessarily related to the display engine?

Different display engines models are affected differently by changes in
document size.

Mozilla's model, where the _entire document_ is converted into an
internal "layed-out-document" data structure, and then that is rendered,
and which is mainly targeted at documents of "reasonable" length but
with complex layout requirements (web pages), is pretty likely to have
an unacceptably high overhead (time and memory used by the
layed-out-document) for extremely large documents.

Emacs, which doesn't maintain a separate "layed-out-document" data
structure at all, and mainly just worries about rendering what's on the
screen from the raw document, has a very different set of tradeoffs.

Now, it's certainly _possible_ that mozilla actually contains special
code to deal with very-large-but-very-simple document structures, and
use a different method with different tradeoffs to render them, but...
it seems unlikely , and AFAIK, it doesn't.  [but of course, this
"special" code would more or less just be an implementation of what
Emacs does already!]

It's also _possible_ that mozilla's algorithms and data-structures are
so incredibly fast and efficient that this overhead is acceptable even
for extremely large documents on modern machines.  Judging from the
observed performance of e.g. firefox on large but simple web pages,
though, this also seems pretty unlikely.

[Emacs of course also does some processing that is proportional to
document length, e.g., coding/decoding, and at the most basic,
I/O... however such processing is likely to be much simpler/faster (and
memory efficient) than what Mozilla has to do layout the document for


Friendless, adj. Having no favors to bestow. Destitute of fortune. Addicted to
utterance of truth and common sense.

reply via email to

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