From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Can we make set_point_both less expensive? Date: Sun, 15 Mar 2015 23:02:49 -0400 Message-ID: References: <5505E34C.4000106@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426475004 25892 80.91.229.3 (16 Mar 2015 03:03:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Mar 2015 03:03:24 +0000 (UTC) Cc: Emacs developers To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 16 04:03:15 2015 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 1YXLJC-0001sz-Jp for ged-emacs-devel@m.gmane.org; Mon, 16 Mar 2015 04:03:14 +0100 Original-Received: from localhost ([::1]:46865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXLJB-0007fn-TS for ged-emacs-devel@m.gmane.org; Sun, 15 Mar 2015 23:03:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXLIz-0007fi-1k for emacs-devel@gnu.org; Sun, 15 Mar 2015 23:03:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXLIv-0005X5-2q for emacs-devel@gnu.org; Sun, 15 Mar 2015 23:03:01 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXLIu-0005X1-U4 for emacs-devel@gnu.org; Sun, 15 Mar 2015 23:02:57 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2G32n1T028224; Sun, 15 Mar 2015 23:02:50 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 254E2AE0BA; Sun, 15 Mar 2015 23:02:49 -0400 (EDT) In-Reply-To: <5505E34C.4000106@dancol.org> (Daniel Colascione's message of "Sun, 15 Mar 2015 12:53:48 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5246=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5246> : inlines <2420> : streams <1406165> : uri <1881449> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:183889 Archived-At: > overlays. Setting inhibit-point-motion-hooks helped, but it occurs to me > that the operation shouldn't have been expensive in the first place. goto-char should never trigger any hook. Properties such as `intangible' are misfeatures, IMO. > In addition to allowing callers to bind inhibit-point-motion-hooks, what > about tracking whether any property or overlay ever inserted into a > buffer uses one of these uncommon facilities? This way, the common case > is fast even without inhibit-point-motion-hooks. I think we should make those goto-char hooks conditional on a variable, and make this variable default to nil. That's an incompatible change, of course, but it would solve this issue. And the var's name should make it clear it's only present to support some legacy feature that's being phased out. Stefan