From: David Moore <dmoore@UCSD.EDU>
Subject: Re: mail fetching speed problems 5.2.25
Date: 25 Oct 1996 16:20:06 -0700 [thread overview]
Message-ID: <rviv7yaaxl.fsf@sdnp5.ucsd.edu> (raw)
In-Reply-To: <rvsp72pvqc.fsf@sdnp5.ucsd.edu>
David Moore <dmoore@ucsd.edu> writes:
>
> If this has been fixed, please let me know, I'll be upgrading to
> red gnus this weekend anyways.
> *** This is a structural problem with how gnus queries backends for new
> *** messages, but might be fixable with adding some smarts to
> *** nnmail-get-active or nnml-request-list.
Oh boy, a self reply.
Looking at the current rgnus source, the same problem seems to
exist. nnmail-activate looks very wrong to me, since the nnml and other
backends seem to set their own BACKEND-group-alist by calling
nnmail-get-active directly. nnmail-activate calls BACKEND-request-list
which generates the list, and then calls nnmail-get-active a second time
on the same data.
Changing nnmail-activate to not make the unneeded call and also
changing the stored timestamp from (current-time) to 'file-time'
(because of possible nfs and other interactions), I've now cut the time
to fetch a single piece of new mail from 61 seconds to about 15, when
using a non-byte-compiled version of nnmail-activate. Of course, a lot
of time is still being wasted here.
New version:
(defun nnmail-activate (backend &optional force)
(let (file timestamp file-time)
(if (or (not (symbol-value (intern (format "%s-group-alist" backend))))
force
(and (setq file (condition-case ()
(symbol-value (intern (format "%s-active-file"
backend)))
(error nil)))
(setq file-time (nth 5 (file-attributes file)))
(or (not
(setq timestamp
(condition-case ()
(symbol-value (intern
(format "%s-active-timestamp"
backend)))
(error 'none))))
(not (consp timestamp))
(equal timestamp '(0 0))
(> (nth 0 file-time) (nth 0 timestamp))
(and (= (nth 0 file-time) (nth 0 timestamp))
(> (nth 1 file-time) (nth 1 timestamp))))))
(save-excursion
(or (eq timestamp 'none)
(set (intern (format "%s-active-timestamp" backend))
;;; dmoore@ucsd.edu 25.10.96
;;; it's not always the case that current-time
;;; does correspond to changes in the file's time. So just compare
;;; the file's new time against its own previous time.
;;; (current-time)
file-time
))
(funcall (intern (format "%s-request-list" backend)))
;;; dmoore@ucsd.edu 25.10.96
;;; BACKEND-request-list already does this itself!
;;; (set (intern (format "%s-group-alist" backend))
;;; (nnmail-get-active))
))
t))
--
David Moore <dmoore@ucsd.edu> | Computer Systems Lab __o
UCSD Dept. Computer Science - 0114 | Work: (619) 534-8604 _ \<,_
La Jolla, CA 92093-0114 | Fax: (619) 534-1445 (_)/ (_)
<URL:http://oj.egbt.org/dmoore/> | Solo Furnace Creek 508 -- 1996!
prev parent reply other threads:[~1996-10-25 23:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-25 21:41 David Moore
1996-10-25 23:20 ` David Moore [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rviv7yaaxl.fsf@sdnp5.ucsd.edu \
--to=dmoore@ucsd.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).