From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5562 Path: main.gmane.org!not-for-mail From: gsstark@MIT.EDU (Greg Stark) Newsgroups: gmane.emacs.gnus.general Subject: Re: performance respooling articles in nnmbox or nnbabyl Date: 17 Mar 1996 13:27:01 -0500 Organization: Massachvsetts Institvte of Technology Sender: gsstark@MIT.EDU Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146148 696 80.91.224.250 (20 Oct 2002 20:35:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:35:48 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.3/8.6.9) with SMTP id KAA01053 for ; Sun, 17 Mar 1996 10:46:07 -0800 Original-Received: from lola-granola.MIT.EDU (LOLA-GRANOLA.MIT.EDU [18.70.0.26]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id ; Sun, 17 Mar 1996 19:27:06 +0100 Original-Received: (from gsstark@localhost) by lola-granola.MIT.EDU (8.7.4/8.6.11) id NAA27171; Sun, 17 Mar 1996 13:27:04 -0500 (EST) Original-To: larsi@ifi.uio.no (Lars Magne Ingebrigtsen) In-Reply-To: larsi@ifi.uio.no's message of 16 Mar 1996 10:58:04 +0100 Original-Lines: 29 X-Mailer: September Gnus v0.51/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:5562 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5562 Yes, the problem only occurs when respooling from nnmbox to nnmbox or from nnbabyl to nnbabyl. Except i think this is a fairly common thing to need to do. Because every time you add a new split-method entry you'll want to re-spool things. A bit of background on Emacs's internal representation of buffers; if i get any of this wrong someone should correct me. A buffer is stored in a contiguous piece of memory with a gap. the gap is always moved to be where you are editting (with some exceptions). Whenever an insertion or deletion is done, the gap has to move there to provide or take up the unused buffer space. The only way to move the gap is essentially equivalent to an memcopy or memmove, and is fairly CPU- intensive. When you request-move an article from the beginning of an mbox group the nnmbox backend deletes the article and inserts it at the end. The deletion needs the gap at the beginning of the buffer and the insertion needs it at the end. I think a reasonable solution to this would be to have an optional nnchoke-request-move-articles that took an assoc list of article numbers and groups to move them to. Only backends for which this allowed a more efficient implementation would provide this function. For nnmbox and nnbabyl -request-move-articles could store all the moved articles in a temporary buffer and insert them all at the end of the operation. greg