Gnus development mailing list
 help / color / mirror / Atom feed
From: James Cloos <cloos+math_uh-ding@jhcloos.com>
To: ding@gnus.org
Subject: gnus-group-find-new-groups vs nnimap
Date: Sat, 25 Aug 2007 00:46:33 -0400	[thread overview]
Message-ID: <m3hcmofcfz.fsf@lugabout.jhcloos.org> (raw)

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



             reply	other threads:[~2007-08-25  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-25  4:46 James Cloos [this message]
2007-08-29 13:17 ` Simon Josefsson
2007-08-29 20:52   ` James Cloos

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=m3hcmofcfz.fsf@lugabout.jhcloos.org \
    --to=cloos+math_uh-ding@jhcloos.com \
    --cc=ding@gnus.org \
    /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).