Gnus development mailing list
 help / color / mirror / Atom feed
* Re2: gnus-cache redux
@ 1995-12-08 16:18 Jari Aalto
  0 siblings, 0 replies; only message in thread
From: Jari Aalto @ 1995-12-08 16:18 UTC (permalink / raw)
  Cc: ding

|7.12.95, Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
| 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)))
    ))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-12-08 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-12-08 16:18 Re2: gnus-cache redux Jari Aalto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).