From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Overlay mechanic improvements Date: Sun, 21 Sep 2014 15:52:27 +0200 Message-ID: <87y4tdnkro.fsf@fencepost.gnu.org> References: <871tr6qup8.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411307586 6593 80.91.229.3 (21 Sep 2014 13:53:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2014 13:53:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 21 15:52:57 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 1XVhZR-0000M4-7C for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 15:52:57 +0200 Original-Received: from localhost ([::1]:39355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVhZQ-0002ol-UA for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 09:52:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVhZN-0002oU-9A for emacs-devel@gnu.org; Sun, 21 Sep 2014 09:52:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVhZM-00037q-AA for emacs-devel@gnu.org; Sun, 21 Sep 2014 09:52:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVhZM-000373-6r for emacs-devel@gnu.org; Sun, 21 Sep 2014 09:52:52 -0400 Original-Received: from localhost ([127.0.0.1]:42793 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVhZ9-0005Bc-NT; Sun, 21 Sep 2014 09:52:40 -0400 Original-Received: by lola (Postfix, from userid 1000) id 8AC44E06F7; Sun, 21 Sep 2014 15:52:27 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Sun, 21 Sep 2014 09:35:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:174602 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > preview-latex > extensively uses overlays (and they can easily grow to a few thousand > per document in a mathematically oriented paper), > > How many overlays would appear on one screen? Probably rarely more than a few dozen (that would mostly be the case when using lots of inline math for small expressions like $a_i$). > Quadratic behavior for the markers used as start- and end markers is > clearly undesirable. > > The existing code should be fat if you recenter the overlays > frequently at point, unless you have lots of overlays on one screen. > Do you recenter them? Not that I know of. > If so, why is it slow? > > Why aren't text properties right for this? Because you don't want _anything_ that text properties do. You don't want to have the stuff cut&paste, you don't want to have the buffer modified because images are switched on and off, you most definitely don't want ever to split its identity in two if there are insertions in the middle, you don't want anything inserted anywhere inheriting anything from it. "We did not bother making overlays work efficiently" is not the right criterion for choosing between overlays and text properties. -- David Kastrup