[Twisted-Python] IMAP fetchUID speed?

I'm trying to figure out what's happening in an IMAP implementation. The server at the moment has a very big backlog -- perhaps 80K messages. I was expecting that if I did this: d.addCallback(lambda x: self.proto.fetchUID('1:10')) things would move along quickly... but there's a huge delay somewhere. I think it's in that callback, since I've added breakpoints in handleuids() and they're not being reached (as they are when I hit a smaller mailbox on a different server). Thanks for any pointers... I'm brand-new to Twisted, but sure like what I'm seeing in it. Nick P.S. I'm using the same sort of approach that John Goerzen's "Python Network Programming" book shows:

Nick Arnett wrote:
You haven't really given enough information. Use e.g. ethereal, or suitable prints in the IMAPClient, to see whether the server replies with the UIDs or not, and whether that happens fast or slow. If the reply from the server takes a long time, the reason is in the server. If the server replies almost immediately, but your callback still doesn't get the UIDs immediately, something very weird is happening. My money is on the former -- the server being slow.

Nick Arnett wrote:
You haven't really given enough information. Use e.g. ethereal, or suitable prints in the IMAPClient, to see whether the server replies with the UIDs or not, and whether that happens fast or slow. If the reply from the server takes a long time, the reason is in the server. If the server replies almost immediately, but your callback still doesn't get the UIDs immediately, something very weird is happening. My money is on the former -- the server being slow.
participants (2)
-
Nick Arnett
-
Tommi Virtanen