From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8501 Path: main.gmane.org!not-for-mail From: David Moore Newsgroups: gmane.emacs.gnus.general Subject: speedup in gnus-sum (B m command) Date: 26 Oct 1996 20:04:05 -0800 Sender: dmoore@sdnp5.ucsd.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148651 12450 80.91.224.250 (20 Oct 2002 21:17:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:17:31 +0000 (UTC) Return-Path: Original-Received: (qmail 20592 invoked from smtpd); 27 Oct 1996 04:25:40 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 27 Oct 1996 04:25:39 -0000 Original-Received: from UCSD.EDU (mailbox1.ucsd.edu [132.239.1.53]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 27 Oct 1996 05:04:53 +0100 Original-Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by UCSD.EDU (8.8.2/8.6.9) with SMTP id VAA13984 for ; Sat, 26 Oct 1996 21:04:50 -0700 (PDT) Original-Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4) id VAA28535; Sat, 26 Oct 1996 21:04:05 -0700 Original-To: "(ding) GNUS Mailing List" Original-Lines: 83 X-Mailer: Gnus v5.2.25/XEmacs 19.14 Xref: main.gmane.org gmane.emacs.gnus.general:8501 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8501 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 | Computer Systems Lab __o UCSD Dept. Computer Science - 0114 | Work: (619) 534-8604 _ \<,_ La Jolla, CA 92093-0114 | Fax: (619) 534-1445 (_)/ (_) | Solo Furnace Creek 508 -- 1996!