Message Count

Hi,

I'm using IMAP protocol and I want to get total message count and unread message count to display near the folders. By using getMessageCount() and getUnreadMessageCount() methods of IMAPFolder, I got them but it works slow especially when calling these methods for more than one folders.

How can I get these counts more efficiently? Thanks...

[367 byte] By [messagecounta] at [2007-11-27 5:59:22]
# 1

You can turn on session debugging and look at the protocol trace to

see what IMAP operations these methods are using. They use what

should be relatively efficient IMAP commands, but of course the

efficiency depends heavily on your IMAP server.

A possible improvement would be to add support to the IMAP provider

for some sort of "batch" operation to get information for many folders.

This wouldn't reduce the work the server has to do, but it would reduce

the number of round trips to the server. If that's the source of your problems,

that could be considered.

bshannona at 2007-7-12 16:35:46 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...