[Top][All Lists]

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

Re: Emacs design and architecture. How about copy-on-write?

From: Ihor Radchenko
Subject: Re: Emacs design and architecture. How about copy-on-write?
Date: Thu, 21 Sep 2023 10:41:52 +0000

Eli Zaretskii <eliz@gnu.org> writes:

> Regardless of all of the above, any expensive processing that can be
> divided between several execution units will take less elapsed time,
> right?

Not necessarily. Only when the particular algorithm used can be
effectively converted into concurrent version. Sometimes, concurrent
version performs worse.

> ... So, for example, processing text properties of two buffers
> sequentially by the same thread (as this is done now) will take longer
> than processing them concurrently in parallel, right?
> ... So redisplaying
> two windows by two independent threads running concurrently on two
> execution units will be faster, right?

If the processing is completely independent, it is probably true.
Unless overheads to create new threads are comparable with processing
time (will matter for small buffers that can be process quickly).

>> I believe that it is more a question of rewriting text property handling
>> into multiple segment trees dedicated to individual properties.
> Not as far as redisplay is concerned, no.  The display engine _wants_
> to look for the next change in any text property, because it processes
> them all "together".  That is, it finds the buffer position where any
> of the text properties change, then hands that position to each of the
> known methods for handling property changes so that each one of them
> does its thing.

This is... not what I know. May you please point me where in the code it
is done?

>From my previous experience, there separate processing of invisible
property and separate processing of composition property. But not
generic processing looking into all present text properties, including
the ones unrelated to redisplay.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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