]> git.cworth.org Git - sup/commitdiff
speed up imap load time
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 23 Nov 2007 22:17:12 +0000 (22:17 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 23 Nov 2007 22:17:12 +0000 (22:17 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@706 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/imap.rb

index 290ae2a76036652e3b54de28c056b50ae0c1ba4a..d648763b0c2f1c77841dd2960a281407a5e9b819 100644 (file)
@@ -87,17 +87,8 @@ class IMAP < Source
   end
   def ssl?; @parsed_uri.scheme == 'imaps' end
 
-  def check
-    return unless start_offset
-
-    ids = 
-      @mutex.synchronize do
-        unsynchronized_scan_mailbox
-        @ids
-      end
-
-    start = ids.index(cur_offset || start_offset) or raise OutOfSyncSourceError, "Unknown message id #{cur_offset || start_offset}."
-  end
+  def check; end # do nothing because anything we do will be too slow,
+                 # and we'll catch the errors later.
 
   ## is this necessary? TODO: remove maybe
   def == o; o.is_a?(IMAP) && o.uri == self.uri && o.username == self.username; end
@@ -253,8 +244,6 @@ private
       end
     end.join
 
-
-
     raise exception if exception
   end