[Framerd-developers] Anybody here?
Brought to you by:
haase
|
From: Andreas B. <an...@an...> - 2001-11-08 16:24:43
|
Hi everybody!
Just wanted to know whether this list is populated at all :).
And while I'm at it, I also have a question: how does FramerD handle
garbage collection? Does it at all?
I've written the following script to import my mail directory into
FramerD, and it keeps growing in memory continuously:
#!/usr/local/bin/fdscript
(set! %pool "/storage/mail.pool")
(set! %debug #t)
(use-pool %pool)
(define index "/storage/mail.index")
(use-index index)
;(set-default-encoding! "latin-1")
(define (allfiles dir)
(if (directory? dir)
(choice (getfiles dir)
(allfiles (getdirs dir)))
(choice dir)))
(define (read-mime-to-database filename)
(let ((frame (make-frame))
(mail-slotmap (READ-MIME (filestring filename))))
(doslots (unit key value MAIL-SLOTMAP) (fadd! frame key value))
(let ((message-id (fget frame 'message-id)))
(when message-id (fadd! frame 'obj-name message-id)))
(index-frame index frame)
(commit-pool %pool)
(commit-index index)
(write frame)))
(define (main)
(dolist (filename (cdr args))
(read-mime-to-database (allfiles filename)))
(commit-pool %pool)
(commit-index index))
Andreas
|