From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vladimir Kazanov Newsgroups: gmane.emacs.devel Subject: Overlay mechanic improvements Date: Fri, 19 Sep 2014 17:59:34 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2492c8eb35105036c5a2b X-Trace: ger.gmane.org 1411139924 30700 80.91.229.3 (19 Sep 2014 15:18:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 15:18:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 17:18:38 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XUzxF-0005Mf-Mc for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 17:18:37 +0200 Original-Received: from localhost ([::1]:58964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUzxF-0000HY-8D for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 11:18:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUzfJ-0002aS-I8 for emacs-devel@gnu.org; Fri, 19 Sep 2014 11:00:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUzfE-00036p-DB for emacs-devel@gnu.org; Fri, 19 Sep 2014 11:00:05 -0400 Original-Received: from mail-ig0-x22c.google.com ([2607:f8b0:4001:c05::22c]:33172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUzfE-00036J-7l for emacs-devel@gnu.org; Fri, 19 Sep 2014 11:00:00 -0400 Original-Received: by mail-ig0-f172.google.com with SMTP id a13so1125628igq.17 for ; Fri, 19 Sep 2014 07:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=BHNv7TUTfi7rWclCfPBSgzBLZFioRn78wsgz1LAojtU=; b=GBQMaVAfMkNRr1A3f8i8owZzUtcz+7XHUfshiSqjAWwb9ht+WqF2/xd9+XNg7V7aKt pj645bxXc+OGnCSKTqLy6jlUNRGZWZFnfTEfkHEAY4cCfibt4XhpBnm4GX/YN7YgE6r4 JyLmICx1/df8rUL6b8DGKxDzn6gzrZeYcQ0DVVOaBWYJ+ewiM/vAZ5qSZCr8lQzsYeFM aQFTtrOinY8ZXH6yf8ydQL9au1jBHhfcoNOURupJX8vzNp5F48hZYolSS7ehRc1N/HoO nB0CxSJrcr1S7r4uviI/2iGn6bFKlrn9YY9Lx/zddWze9/+UqI5067S6u9+0xk/O8NoY MrNw== X-Received: by 10.43.158.195 with SMTP id lv3mr1747280icc.30.1411138794204; Fri, 19 Sep 2014 07:59:54 -0700 (PDT) Original-Received: by 10.107.18.133 with HTTP; Fri, 19 Sep 2014 07:59:34 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174556 Archived-At: --001a11c2492c8eb35105036c5a2b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello everyone! Couple of days ago I submitted a question to Stackoverflow regarding an adequate way to handle many (thousands, that is) overlays. I wanted to know if there are any alternatives to using overlays (which is slow) for cases similar to mine. To make a long story short, I am building a generalized incremental tokenizer, details can be read on Stackoverflow ( http://stackoverflow.com/questions/25915908/best-way-to-save-lots-of-positi= on-pairs-in-emacs-lisp). It turns out that the only viable alternative to overlays is using text properties, and text properties were not meant for the purpose. All I need is an ability to save position pairs, the positions should survive text insertion/deletion and there should be a way to find those pairs given a buffer point. Overlay interface is perfect (consider overlays-at, overlays-in and the dynamic (re-)positioning system). After answering my question Stefan (Monnier?) mentioned that overlay behavior can be fixed from N^2 to N*logN, which would make them asymptotically equivalent to text properties; adding that he has no time to implement the fix. I believe that given some time, a few tips from experienced Emacs developers and enough coffee I can at least try to fulfil the task. I am not in a hurry, and wanted to get into Emacs internals anyway. What do you think? PS I already have my Cedet/Emacs FSF papers signed - sent a minor patch to Cedet some time ago. --=20 Yours sincerely, Vladimir Kazanov -- =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80 =D0=9A=D0=B0=D0=B7=D0=B0= =D0=BD=D0=BE=D0=B2 --001a11c2492c8eb35105036c5a2b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello everyone!

Couple of days ago I submitted a qu= estion to Stackoverflow regarding an adequate way to handle many (thousands= , that is) overlays. I wanted to know if there are any alternatives to usin= g overlays (which is slow) for cases similar to mine. To make a long story = short, I am building a generalized incremental tokenizer, details can be re= ad on Stackoverflow (http://stackoverflo= w.com/questions/25915908/best-way-to-save-lots-of-position-pairs-in-emacs-l= isp). =C2=A0
It turns out that the only viable alternative to overla= ys is using text properties, and text properties were not meant for the pur= pose. All I need is an ability to save position pairs, the positions should= survive text insertion/deletion and there should be a way to find those pa= irs given a buffer point. Overlay interface is perfect (consider overlays-a= t, overlays-in and the dynamic (re-)positioning system).

After answe= ring my question Stefan (Monnier?) mentioned that overlay behavior can be f= ixed from N^2 to N*logN, which would make them asymptotically equivalent to= text properties; adding that he has no time to implement the fix.=C2=A0=C2= =A0

I believe that given some time, a few tips fr= om experienced Emacs developers and enough coffee I can at least try to ful= fil the task. I am not in a hurry, and wanted to get into Emacs internals a= nyway.

What do you think?=C2=A0

PS I already have my Cedet/Em= acs FSF papers signed - sent a minor patch to Cedet some time ago.

--
Yours sincerely,


Vladimir Kazanov


= --
=D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC,
=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80 =D0=9A=D0=B0=D0=B7=D0=B0= =D0=BD=D0=BE=D0=B2
--001a11c2492c8eb35105036c5a2b--