From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59905 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: XEmacs-friendly version of message-strip-forbidden-properties Date: Fri, 25 Feb 2005 07:35:39 +0900 Organization: Emacsen advocacy group Message-ID: References: <874qg382a6.fsf@xemacs.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109284555 31542 80.91.229.2 (24 Feb 2005 22:35:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2005 22:35:55 +0000 (UTC) Original-X-From: ding-owner+M8446@lists.math.uh.edu Thu Feb 24 23:35:55 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D4RaF-0000pI-Hv for ding-account@gmane.org; Thu, 24 Feb 2005 23:35:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1D4RaS-0003mb-00; Thu, 24 Feb 2005 16:36:00 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D4RaN-0003mW-00 for ding@lists.math.uh.edu; Thu, 24 Feb 2005 16:35:55 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D4RaK-000220-T3 for ding@lists.math.uh.edu; Thu, 24 Feb 2005 16:35:53 -0600 Original-Received: from washington.hostforweb.net ([69.61.11.2]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1D4RaF-0006ri-00 for ; Thu, 24 Feb 2005 23:35:47 +0100 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.44) id 1D4RaF-0003Ib-Hk for ding@gnus.org; Thu, 24 Feb 2005 17:35:47 -0500 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:k721Y2wZAVuu7YgOc1FIwcO3+OQ= X-Hashcash: 1:20:050224:ding@gnus.org::j/s1WOGRAM5RfhR8:00001fdq X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -4.8 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8446@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: main.gmane.org gmane.emacs.gnus.general:59905 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59905 >>>>> In <874qg382a6.fsf@xemacs.org> Hrvoje Niksic wrote: > Some time ago I noticed that inserting largeish chunks of text > (e.g. with C-x i) was quite slow in message buffers. I traced the > slowness to after-change-functions set by message, namely > message-strip-forbidden-properties. Leaving aside my personal > thoughts on whether this approach to removing forbidden properties is > necessary or even desirable, I noticed that the function iterates the > inserted region char by char and calls text property functions on each ^^^^^^^^^^^^ > character. This cannot be fast when inserting regions containing > thousands of characters. You are talking about Gnus v5.10.x or v5.11, aren't you? In the most recent Gnus CVS, it has been much simplified as follows: (defun message-strip-forbidden-properties (begin end &optional old-length) "[...]" (when (and message-strip-special-text-properties (message-tamago-not-in-use-p begin)) (let ((buffer-read-only nil) (inhibit-read-only t)) (remove-text-properties begin end message-forbidden-properties)))) It was done, following Romain Francoise's change of the way to hide headers according to message-hidden-headers. I think it might be faster to use extent functions in XEmacs, though.