From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Overlay mechanic improvements Date: Sun, 21 Sep 2014 19:56:39 +0300 Message-ID: <83zjdsyks8.fsf@gnu.org> References: <871tr6qup8.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411318645 2611 80.91.229.3 (21 Sep 2014 16:57:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2014 16:57:25 +0000 (UTC) Cc: dak@gnu.org, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 21 18:57:17 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 1XVkRo-0005BA-2K for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 18:57:16 +0200 Original-Received: from localhost ([::1]:40190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVkRn-0007mz-Ov for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 12:57:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVkRg-0007mt-3v for emacs-devel@gnu.org; Sun, 21 Sep 2014 12:57:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVkRa-0008Oh-Vn for emacs-devel@gnu.org; Sun, 21 Sep 2014 12:57:08 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:49115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVkRV-0008M1-5E; Sun, 21 Sep 2014 12:56:57 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NC900400G749I00@mtaout26.012.net.il>; Sun, 21 Sep 2014 19:54:50 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC90020KGBEJV20@mtaout26.012.net.il>; Sun, 21 Sep 2014 19:54:50 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 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:174614 Archived-At: > From: Stefan Monnier > Date: Sun, 21 Sep 2014 12:07:48 -0400 > Cc: David Kastrup , emacs-devel@gnu.org > > We rarely suffer from overlay's performance issues because most codes > that could suffer from it simply avoid using overlays (or they try to > minimize the number of overlays used, e.g. by flushing those overlays > currently not visible), even when they would be the right tool. Or they > add calls to overlay-recenter when the performance problem is diagnosed. We should distinguish between 2 use cases here. One is when overlays need to be displayed. In that case, indeed only the overlays in the visible region count, which are normally not too many, and the display engine already does the equivalent of overlay-recenter for each display line. The other use case is when some Lisp program, or even some part of Emacs, needs to search for the next/previous change in character properties, or find the beginning or end of an overlay. In those cases, you cannot assume that only the visible portion of a buffer matters, so in large buffers with many overlays this could be rather painful. > I don't see any obvious reason why re-using the existing intervals.c > tree wouldn't work well. Overlays can overlap, while text properties cannot. Does that matter for what intervals.c implement?