aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes JavaMail get IMAP folder size very slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail get IMAP folder size very slow" Watch "JavaMail get IMAP folder size very slow" New topic
Author

JavaMail get IMAP folder size very slow

Tod Stroszer
Greenhorn

Joined: Oct 24, 2007
Posts: 28
I was asked to rewrite this perl code that uses perl's MAIL::IMAPClient API to get the size of an IMAP folder to Java using JavaMail. The perl looks like



The perl basically totals the rfc822 size of each message in an IMAP folder to get the total size of the folder. I rewrote this in Java like



The perl and java give identical results for IMAP folder sizes - but the Java takes *much* longer to run. For my mailboxes, the perl takes about a minute, while the Java takes about 45 minutes. I'm not sure why this is happening. Is there anything about my code, or any other factors I should be looking at that would explain why Java takes so much longer to do the same thing?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail get IMAP folder size very slow
 
Similar Threads
jscript problems
99 bottles of beer
Compare datas
can i use java to check the disk usage?
There is no Action mapped for action name prePaymentManager