From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8211 Path: main.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.gnus.general Subject: Re: backgrounded expire deletes Date: 07 Oct 1996 15:05:00 -0400 Sender: raeburn@cygnus.com Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148409 10756 80.91.224.250 (20 Oct 2002 21:13:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:13:29 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: Original-Received: (qmail 26075 invoked from smtpd); 7 Oct 1996 19:27:39 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 7 Oct 1996 19:27:38 -0000 Original-Received: from cygnus.com (cygnus.com [140.174.1.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 7 Oct 1996 21:05:35 +0200 Original-Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) by cygnus.com (8.6.12/8.6.9) with SMTP id MAA04043; Mon, 7 Oct 1996 12:05:06 -0700 Original-Received: from cujo.cygnus.com by tweedledumb.cygnus.com (4.1/4.7) id AA00506; Mon, 7 Oct 96 15:05:03 EDT Original-Received: by cujo.cygnus.com; (5.65v3.2/1.1.8.2/20Sep95-0235PM) id AA05684; Mon, 7 Oct 1996 15:05:01 -0400 Original-To: Wesley.Hardaker@sphys.unil.ch In-Reply-To: Wesley.Hardaker@sphys.unil.ch's message of 07 Oct 1996 16:21:03 +0100 Original-Lines: 36 X-Mailer: Red Gnus v0.45/Emacs 19.33 Xref: main.gmane.org gmane.emacs.gnus.general:8211 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8211 I've been thinking about this recently too. > 1) put the file name in a buffer and save the buffer on exiting gnus, > and allow a cron job to check for the file at night and remove the > articles then. > > 2) collect names of the files and pass them to a long winded /bin/rm > system call with a '&' at the end. Both of these still require spending a lot of time stat'ing each file when exiting the group. They probably would cut the time about in half. (The stat info can be cached, but in the current implementation a lot more stats are done than necessary when you have sparse article numbers.) How about adding the group to a list of groups that should be expired, maybe with a list of article numbers to check, and doing the expiration while idle? A function could be fired up when emacs is idle for 5 seconds or do. It could check and maybe delete a couple of articles, check for input availability using sit-for, and continue if none is available or reschedule itself if it is. If you enter a group already on the list, just remove it from the list; it'll get re-added when you leave. On exiting gnus, perhaps the remaining expirations could be run, or the state could be saved away in .newsrc.eld for processing next time gnus is fired up. This could leave unsaved .overview buffers around some of the time while the expires are in progress. I'm not sure if that'd be a big problem, or how best to deal with it if it is. Maybe they could be saved when available input is detected. This would cost a bit of efficiency, but overall we'd probably win by avoiding large delays for the user.