unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alin Soare <as1789@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: line buffer as Red Black Trees instead of linear
Date: Thu, 22 May 2014 12:33:29 +0300	[thread overview]
Message-ID: <CA+Xtq3X=58WEaUX-OXL48HpL-67DHcs0UzPwVdYEsKFrQOSO3w@mail.gmail.com> (raw)
In-Reply-To: <83zjibm5d1.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

>
>
>
> So this means you will also have to rearrange the tree whenever
> display properties change, which is more work, and non-trivial one at
> that (access to overlay strings is not very efficient in Emacs, when
> there are many of them).
>
> And what happens with text that is covered with an invisible text
> property?  Does it disappear from the tree?
>

If you keep a single RBT only for overlays, this tree will be modified only
in case of overlay change.


And if you have a single property "narrow from X to Y", and inside X and Y
there is other property, in the moment when you compute something on this
tree, you can simply jump from the node X to the node keeping offset Y. You
can ignore what is inside the tree, and the jump is done logarithmically,
because searching in RBT is guaranteed to be log in the worse time.

Your example shows clearly that it is better to make a separate tree for
each class of properties, than keeping text together overlays , together
with font locks in the same tree.

[-- Attachment #2: Type: text/html, Size: 1754 bytes --]

      reply	other threads:[~2014-05-22  9:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 14:33 line buffer as Red Black Trees instead of linear Alin Soare
2014-05-15 17:15 ` Alin Soare
2014-05-15 19:17 ` Stefan Monnier
2014-05-15 19:47   ` Alin Soare
2014-05-15 20:06     ` Eli Zaretskii
2014-05-15 20:38       ` Slow redisplay with long lines Stefan Monnier
2014-05-15 20:57         ` Stephan Mueller
2014-05-16  5:40           ` Eli Zaretskii
2014-05-16 18:08             ` Stephan Mueller
2014-05-16 20:36               ` Eli Zaretskii
2014-05-16  5:39         ` Eli Zaretskii
2014-05-15 23:40       ` line buffer as Red Black Trees instead of linear Alin Soare
2014-05-16  5:41         ` Eli Zaretskii
2014-05-16  7:44           ` Alin Soare
2014-05-16  8:28             ` Eli Zaretskii
2014-05-16  8:53               ` Alin Soare
2014-05-16  9:24                 ` Thien-Thi Nguyen
2014-05-21  8:34                 ` Alin Soare
2014-05-21 15:17                   ` Eli Zaretskii
2014-05-21 16:00                     ` Alin Soare
2014-05-21 17:03                       ` Eli Zaretskii
2014-05-22  9:33                         ` Alin Soare [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Xtq3X=58WEaUX-OXL48HpL-67DHcs0UzPwVdYEsKFrQOSO3w@mail.gmail.com' \
    --to=as1789@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).