Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-group-find-new-groups vs nnimap
@ 2007-08-25  4:46 James Cloos
  2007-08-29 13:17 ` Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: James Cloos @ 2007-08-25  4:46 UTC (permalink / raw)
  To: ding

One issue I've seen with nnimap is that, when it is asked for new
groups (either at gnus startup or due to an explicit call to
gnus-group-find-new-groups) it EXAMINEs *every* group returned by
the call to LSUB, rather than just the new groups.  That means that
at startup EXAMINE is called on every known group *twice*.

The time loss for doing that is significant for me.  On the order
of hours.

The code looks like:

,----( from gnus/lisp/nnimap.el )
| (deffoo nnimap-request-newgroups (date &optional server)
|   (when (nnimap-possibly-change-server server)
|     (with-current-buffer nntp-server-buffer
|       (gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s..."
|                     (if (> (length server) 0) " on " "") server)
|       (erase-buffer)
|       (nnimap-before-find-minmax-bugworkaround)
|       (dolist (pattern (nnimap-pattern-to-list-arguments
|                         nnimap-list-pattern))
|         (dolist (mbx (imap-mailbox-lsub (cdr pattern) (car pattern) nil
|                                         nnimap-server-buffer))
|           (or (catch 'found
|                 (dolist (mailbox (imap-mailbox-get 'list-flags mbx
|                                                    nnimap-server-buffer))
|                   (if (string= (downcase mailbox) "\\noselect")
|                       (throw 'found t)))
|                 nil)
|               (let ((info (nnimap-find-minmax-uid mbx 'examine)))
|                 (when info
|                   (insert (format "\"%s\" %d %d y\n"
|                                   mbx (or (nth 2 info) 0)
|                                   (max 1 (or (nth 1 info) 1)))))))))
|       (gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s...done"
|                     (if (> (length server) 0) " on " "") server))
|     t))
`----

As far as I can tell, at the point just before (nnimap-find-minmax-uid
mbx 'examine) is called, I'd need to search for (mbx) in the current
buffer and skip the (insert) if it is found, yes?

Any suggestions on how best to accomplish that?

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-29 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-25  4:46 gnus-group-find-new-groups vs nnimap James Cloos
2007-08-29 13:17 ` Simon Josefsson
2007-08-29 20:52   ` James Cloos

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).