Hi Mark, Have you tried using X-GM-RAW (http://code.google.com/apis/gmail/imap/ #x-gm-raw) for a search of a label and a date? You could query on "label:inbox after:YYYYMMDD" where YYYYMMDD is the last day you checked (granularity on this search is to the day, not the hour). Then you could go through the return set to find the most recent X threads among the mails. You could skip the "lable:inbox" to search all email.
I'm not a Gmail guru, but this looks like a way to narrow down what you iterate over. Also, if you could talk a little more about what you would like to do with the X most recent threads, maybe we could think of another approach. /Rufus more tips on searches: https://mail.google.com/support/bin/answer.py?answer=7190 On Sep 19, 7:04 am, Mark McLaren <[email protected]> wrote: > I previously posted my query to google-mail-xoauth-tools but have been > advised to post my query here as it is an official forum and is actively > monitored by Google Developer Relations. > > I've compared the speed that the Gmail Atom Inbox thread feed is generated > with an equivalent behaviour using Gmail IMAP and found Atom feed to be > significantly faster. I appreciate these are labs features and probably not > officially supported. > > I am looking for the optimal way to acquire a list of the top X most > recently active Gmail threads. I am using Java, XOAUTH and the Gmail IMAP > Extensions [X-GM-EXT-1]. I see that the Google App Script provides > functionality that would be really useful for this "getInboxThreads(start, > max)". > > Is there a better way than iterating through the INBOX until X distinct > message threads have been identified? > > http://stackoverflow.com/q/7322001/292219 > > Any advice gratefully received. Many thanks, > > Mark -- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
