From: David Moore <dmoore@UCSD.EDU>
Subject: speedup in gnus-sum (B m command)
Date: 26 Oct 1996 20:04:05 -0800 [thread overview]
Message-ID: <rvk9sddpe2.fsf@sdnp5.ucsd.edu> (raw)
It always seemed strange to me that 'B m' would take 10-20
seconds before it even prompted me for the destination group name.
With this replacement gnus-read-move-group-name in my .gnus, even when
uncompiled I get the prompt in 0 time, and it seems equivalently fast
for doing expansion.
I'm also currently putzing around with changes to elp which
allow it to do full profiling (ie, call tree information) which might
help with gnus's strange oo-backend call traces. Before I write all of
this, has anyone on the list done something similar? (I've already
fixed elp to properly handle autoloads and keysequences making it
"safer" to use on gnus.)
;;; dmoore@ucsd.edu 26.10.96
;;; gnus-read-move-group-name was horribly expensive. Fixed up.
;;; Avoid calling mapatoms on possible huge gnus-active-hashtb,
;;; and rather let completing read do what it was designed to.
(defun gnus-valid-move-group-p (group)
(and (boundp group)
(symbol-name group)
(memq 'respool
(assoc (symbol-name
(car (gnus-find-method-for-group
(symbol-name group))))
gnus-valid-select-methods))))
(defun gnus-read-move-group-name (prompt default articles prefix)
"Read a group name."
(let* ((split-name (gnus-get-split-value gnus-move-split-methods))
(minibuffer-confirm-incomplete nil) ; XEmacs
(prom
(format "%s %s to:"
prompt
(if (> (length articles) 1)
(format "these %d articles" (length articles))
"this article")))
(to-newsgroup
(cond
((null split-name)
(gnus-completing-read default prom
gnus-active-hashtb
'gnus-valid-move-group-p
nil prefix
'gnus-group-history))
((= 1 (length split-name))
(gnus-completing-read (car split-name) prom
gnus-active-hashtb
'gnus-valid-move-group-p
nil nil
'gnus-group-history))
(t
(gnus-completing-read nil prom
(mapcar (lambda (el) (list el))
(nreverse split-name))
nil nil nil
'gnus-group-history)))))
(when to-newsgroup
(if (or (string= to-newsgroup "")
(string= to-newsgroup prefix))
(setq to-newsgroup (or default "")))
(or (gnus-active to-newsgroup)
(gnus-activate-group to-newsgroup)
(if (gnus-y-or-n-p (format "No such group: %s. Create it? "
to-newsgroup))
(or (and (gnus-request-create-group
to-newsgroup (gnus-group-name-to-method to-newsgroup))
(gnus-activate-group to-newsgroup nil nil
(gnus-group-name-to-method
to-newsgroup)))
(error "Couldn't create group %s" to-newsgroup)))
(error "No such group: %s" to-newsgroup)))
to-newsgroup))
--
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!
next reply other threads:[~1996-10-27 4:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-27 4:04 David Moore [this message]
1996-10-30 3:35 ` ELP (was Re: speedup in gnus-sum (B m command)) Ken Raeburn
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=rvk9sddpe2.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).