From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: `make-overlay' very slow Date: Wed, 15 Apr 2009 12:56:36 +0900 Message-ID: References: <20090410.235059.24212167.wl@gnu.org> <20090411.004248.247201382.wl@gnu.org> <20090411.081150.169736792.wl@gnu.org> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1239767830 21938 80.91.229.12 (15 Apr 2009 03:57:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2009 03:57:10 +0000 (UTC) Cc: acm@muc.de, schwab@linux-m68k.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 15 05:58:29 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LtwGa-0006zR-W1 for ged-emacs-devel@m.gmane.org; Wed, 15 Apr 2009 05:58:29 +0200 Original-Received: from localhost ([127.0.0.1]:45554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtwFC-0002UF-DZ for ged-emacs-devel@m.gmane.org; Tue, 14 Apr 2009 23:57:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtwEv-0002Oy-Fq for emacs-devel@gnu.org; Tue, 14 Apr 2009 23:56:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtwEs-0002MU-0Z for emacs-devel@gnu.org; Tue, 14 Apr 2009 23:56:45 -0400 Original-Received: from [199.232.76.173] (port=49259 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtwEr-0002MP-OU for emacs-devel@gnu.org; Tue, 14 Apr 2009 23:56:41 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:63065) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LtwEp-0007uo-6w; Tue, 14 Apr 2009 23:56:39 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n3F3uV2q016700; Wed, 15 Apr 2009 12:56:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n3F3uVhk018463; Wed, 15 Apr 2009 12:56:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id n3F3uPgc028095; Wed, 15 Apr 2009 12:56:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LtwEm-0008V1-W8; Wed, 15 Apr 2009 12:56:36 +0900 In-reply-to: (message from Stefan Monnier on Tue, 14 Apr 2009 09:03:09 -0400) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110295 Archived-At: In article , Stefan Monnier writes: > > More radical idea, not related to overlays, is to make one > > interval tree for one text property; i.e. one for `face', > > one for `fontified'... I think it not only improves the > > processing speed, but also reduces the memory usage > > (next-property-change will get slower, but we use > > next-single-property-change more often). > I've been tempted as well, but I'm not sure it'd be much of > an improvement. You'd end up with many trees, so might need > a hash-table or some other tree to map text-property names to the > corresponding interval tree. I think the number of properties is not that much in normal use and using just `assq' is sufficient. I seldom see more than 8 kinds of properties. And, we can move the lastly accessed interval tree to the head of interval tree list if speed up is really necessary. --- Kenichi Handa handa@m17n.org