From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4314 Path: main.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.gnus.general Subject: Re2: gnus-cache redux Date: Fri, 8 Dec 1995 18:18:33 +0200 Message-ID: <199512081618.SAA08528@aapo.tele.nokia.fi> Reply-To: (Jari Aalto, Finland) NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035145076 29131 80.91.224.250 (20 Oct 2002 20:17:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:17:56 +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 miranova.com (8.6.11/8.6.9) with ESMTP id LAA22611 for ; Fri, 8 Dec 1995 11:31:32 -0800 Original-Received: from noknic.nokia.com (noknic.nokia.com [131.228.6.10]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id ; Fri, 8 Dec 1995 19:35:26 +0100 Original-Received: from zeus.tele.nokia.fi (zeus.tele.nokia.fi [131.228.134.50]) by noknic.nokia.com (8.6.9/8.6.9) with ESMTP id UAA01905; Fri, 8 Dec 1995 20:34:52 +0200 Original-Received: from aapo.tele.nokia.fi (aapo.tele.nokia.fi [131.228.134.64]) by zeus.tele.nokia.fi (8.6.4/8.6.4) with ESMTP id SAA09964; Fri, 8 Dec 1995 18:17:10 +0200 Original-Received: from localhost (jaalto@localhost) by aapo.tele.nokia.fi (8.6.4/8.6.4) id SAA08528; Fri, 8 Dec 1995 18:18:33 +0200 Original-To: larsi@ifi.uio.no Xref: main.gmane.org gmane.emacs.gnus.general:4314 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4314 |7.12.95, Lars Magne Ingebrigtsen | Or whatever. | | Anyways, I've added an active file to gnus-cache, which means that | Gnus startup with the cache won't be noticably slower than starting | Gnus without the cache. | | While I'm revising gnus-cache, I wonder whether I should do more. I'm | not really satisfied with the method Gnus uses for entering/removing | stuff from the cache -- it's all based on the article marks, and it | feels a bit kludgy. I'm also wondering how to fit that "persistent | article" thingie into the scheme. | | I'm open to ideas. If you've given gnus-cache some thought, speak now | or forever hold your tongue. (Ick!) I haven't got the slightest idea of what/how it does caching... but maybe you could use the hash array as I do in my rcs package? Something like this...(Ick, untested) tirc = tinyrcs.el (defvar tirc-:hash-table "Cache for file's information.") ;;; ............................................................ &hash ... (defun tirc-init-hash () "Clears hash table." (setq tirc-:hash-table (make-vector 60 nil))) (defmacro tirc-hash-get (file &optional allocate) "Gets hash table entry for file." (` (if (, allocate) (intern (, file) tirc-:hash-table) (intern-soft (, file) tirc-:hash-table)))) (defun tirc-hash-prop (file prop &optional put-value) "Gets property PROP for FILE. If FILE is not a bucket, signal error. Optionally replaces PROPERTY contents with PUT-VALUE. " (let* (sym) (if (null (setq sym (tirc-hash-get file))) (error "No bucket for file.") (if put-value (put sym prop put-value) (get sym prop))) ))