Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68360 > unrolled thread

imapclient Gmail search() times

Started byGrant Edwards <invalid@invalid.invalid>
First post2014-03-14 18:53 +0000
Last post2014-03-14 18:53 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  imapclient Gmail search() times Grant Edwards <invalid@invalid.invalid> - 2014-03-14 18:53 +0000

#68360 — imapclient Gmail search() times

FromGrant Edwards <invalid@invalid.invalid>
Date2014-03-14 18:53 +0000
Subjectimapclient Gmail search() times
Message-ID<lfvj84$1n4$1@reader1.panix.com>
I'm working on a small app to help sort/organize my mail via Gmail's
IMAP server, and I'm using imapclient (BTW it's a _huge_ improvement
over imaplib).

The odd thing I'm seeing is that when searching a large "folder" (All
Mail), I get wildly different times depending on what header I search.

  allmail = IMAPClient(HOST, use_uid=True, ssl=True, port=993)
  allmail.login(USERNAME, PASSWORD)
  allmail.select_folder('[Gmail]/All Mail')

Searching on "Message-Id:" is fast (sub-second):

  irt = allmail.search('HEADER Message-ID %s' % msgid)

Searching on "In-Reply-To:" takes 10-15 seconds:

  rt  = allmail.search('HEADER In-Reply-To %s' % msgid)

[IIRC, I've got about 22000 messages in the 'All Mail' "folder".]

I'm assuming this is just due to the way that Google implmented their
IMAP server code, but I thought I'd ask if anybody else had noticed
this.  Perhaps I'm doing something stupid, but I can't imagine what it
would be....
  
-- 
Grant Edwards               grant.b.edwards        Yow! I have a TINY BOWL in
                                  at               my HEAD
                              gmail.com            

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web