From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57053 Path: main.gmane.org!not-for-mail From: Chris Green Newsgroups: gmane.emacs.gnus.general Subject: Re: emulating mozilla's Label command Date: Fri, 16 Apr 2004 12:30:39 -0400 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <4noepxs0fo.fsf@b2-25-3.bwh.harvard.edu> <87n05hnny5.fsf@emptyhost.emptydomain.de> <4nad1fq4ja.fsf@b2-25-3.bwh.harvard.edu> <4nk70hav21.fsf@b2-25-3.bwh.harvard.edu> <4nk70g9dom.fsf@b2-25-3.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082133077 412 80.91.224.253 (16 Apr 2004 16:31:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2004 16:31:17 +0000 (UTC) Original-X-From: ding-owner+M5593@lists.math.uh.edu Fri Apr 16 18:31:03 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BEWF5-0003Ds-00 for ; Fri, 16 Apr 2004 18:31:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BEWEs-0004br-00; Fri, 16 Apr 2004 11:30:50 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BEWEl-0004bl-00 for ding@lists.math.uh.edu; Fri, 16 Apr 2004 11:30:43 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BEWEk-00006b-QJ for ding@lists.math.uh.edu; Fri, 16 Apr 2004 11:30:42 -0500 Original-Received: from host49.ipowerweb.com (host49.ipowerweb.com [12.129.198.139]) by justine.libertine.org (Postfix) with ESMTP id 074473A0058 for ; Fri, 16 Apr 2004 11:30:42 -0500 (CDT) Original-Received: from pool-151-196-19-226.balt.east.verizon.net ([151.196.19.226] helo=localhost.dok.org) by host49.ipowerweb.com with asmtp (Exim 3.36 #1) id 1BEWET-0006OR-00 for ding@gnus.org; Fri, 16 Apr 2004 09:30:26 -0700 Original-To: ding@gnus.org In-Reply-To: <4nk70g9dom.fsf@b2-25-3.bwh.harvard.edu> (Ted Zlatanov's message of "Fri, 16 Apr 2004 10:53:45 -0400") User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host49.ipowerweb.com X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - dok.org Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57053 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57053 Ted Zlatanov writes: > The registry will need reverse mappings to do this, which will use > memory and CPU. So it should be optional, and if it's off then it > will cost the user more CPU to retrieve the reverse mapping (but the > CPU and memory costs will be localized instead of distributed). > There should be four settings for caching: > > t (build cache ASAP and keep it) > nil (never, only build cache when needed and release it afterwards) > 'opportunistic (cache is built when needed and reused later) > '(...) (list of types of extra data that should be cached, all others > are built when needed) Ahh that would be a nice generic feature. I was sitting here thinking of "oh it wouldn't be hard to copy the hash table stuff to make a reverse map for labels".. I'm not sure what nil means here. The purpose of that variable is to keep memory down at the potential expense of CPU. In that mode, a each cache-reverse lookup would have to do an O(N) search. Put another way: Is the difference between 'opportunistic and nil: 1) saving to disk or 2) creation of an in-memory cache at all > What do you think? Seems like a great solution to me. -- Chris Green To err is human, to moo bovine.