Add more changes related to the new methodology for requesting backend data.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 4 Sep 2010 17:15:31 +0000 (19:15 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 4 Sep 2010 17:15:31 +0000 (19:15 +0200)
lisp/ChangeLog
lisp/gnus-start.el
lisp/mail-source.el
lisp/nnvirtual.el

index 651fdaf..7692245 100644 (file)
@@ -1,8 +1,15 @@
 2010-09-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-get-unread-articles): Rewrite the way we request
+       data from the backends, so that we only request the list of groups from
+       each method once.  This should speed things up considerably.
+
+       * nnvirtual.el (nnvirtual-request-list): Remove function so that we can
+       detect that it's not implemented.
+
        * nnmh.el (nnmh-request-list-1): Fix up the recursion behavior so that
        we actually do recurse down into the tree, but don't stat all leaf
-       nodes. 
+       nodes.
 
        * gnus-html.el (gnus-html-show-images): If there are no images to show,
        then say so instead of bugging out.
index 3c78ac9..16a733d 100644 (file)
@@ -1684,7 +1684,7 @@ If SCAN, request a scan of that group as well."
           alevel))
         (methods-cache nil)
         (type-cache nil)
-        scanned-methods info group active method retrieve-groups cmethod
+        infos info group active method cmethod
         method-type method-group-list)
     (gnus-message 6 "Checking new news...")
 
@@ -1749,15 +1749,15 @@ If SCAN, request a scan of that group as well."
       ;; See if any of the groups from this method require updating.
       (when (block nil
              (dolist (info infos)
-               (when (< (gnus-info-level info)
-                        (if (eq method-type 'foreign)
-                            foreign-level
-                          alevel))
+               (when (<= (gnus-info-level info)
+                         (if (eq method-type 'foreign)
+                             foreign-level
+                           alevel))
                  (return t))))
        (gnus-read-active-for-groups method infos)
        (dolist (info infos)
          (inline (gnus-get-unread-articles-in-group
-                  info (gnus-active (gnus-info-group info)) t)))))
+                  info (gnus-active (gnus-info-group info)))))))
     (gnus-message 6 "Checking new news...done")))
 
 (defun gnus-method-rank (type method)
@@ -1784,13 +1784,14 @@ If SCAN, request a scan of that group as well."
      ((gnus-check-backend-function 'retrieve-groups (car method))
       (gnus-read-active-file-2
        (mapcar (lambda (info)
-                (gnus-info-group info))
+                (gnus-group-real-name (gnus-info-group info)))
               infos)
        method))
      ((gnus-check-backend-function 'request-list (car method))
       (gnus-read-active-file-1 method nil))
      (t
-      (error "No method for %S" method)))))
+      (dolist (info infos)
+       (gnus-activate-group (gnus-info-group info) nil nil method))))))
 
 ;; Create a hash table out of the newsrc alist.  The `car's of the
 ;; alist elements are used as keys.
index 4a313f2..08b7a5e 100644 (file)
@@ -546,7 +546,7 @@ Return the number of files that were found."
        (save-excursion
          (nnheader-message 4 "%sReading incoming mail from %s..."
                            (if method
-                               (format "%s: ")
+                               (format "%s: " method)
                              "")
                            (car source))
          (let ((function (cadr (assq (car source) mail-source-fetcher-alist)))
index 7433972..94f4321 100644 (file)
@@ -300,10 +300,6 @@ component group will show up when you enter the virtual group.")
   t)
 
 
-(deffoo nnvirtual-request-list (&optional server)
-  (nnheader-report 'nnvirtual "LIST is not implemented."))
-
-
 (deffoo nnvirtual-request-newgroups (date &optional server)
   (nnheader-report 'nnvirtual "NEWGROUPS is not supported."))