java mail performance issue
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, October 5, 2003 10:39 PM

i am using javamail API's 1.3 my main concern is related to performance improvement in javamail by making some adjustments so that it uses less system resources. As javamail api's doesnt provide any class which can tell what is the size of a particular folder. one way to do this is to add each message size from that folder and show the final result. But this really put lot of load when we need to deal with more than 1000 msgs in a folder. To overcome this issue i found another way. Instead of using javamail api's and mail server bridge i got the file size by implementing class File and its method file.getSize(). This really did helped in reducing the load on system    More>>

i am using javamail API's 1.3


my main concern is related to performance improvement in javamail by making some adjustments so that it uses less system resources.




As javamail api's doesnt provide any class which can tell what is the size of a particular folder.




one way to do this is to add each message size from that folder and show the final result. But this really put lot of load when we need to deal with more than 1000 msgs in a folder.



To overcome this issue i found another way. Instead of using javamail api's and mail server bridge i got the file
size by implementing class File and its method file.getSize(). This really did helped in reducing the load on system resources as well as on the mail server.



But i am again stuck at another point. When i need to find out how many unread messages are there in folder , i have to use .... folder.getUnreadMessageCount(); the implementation of this method is that it will get each Message in the folder using getMessage(int) and checks whether its SEEN flag is set. If that folder has more than 2000 msgs it really loads the mail server and System resources.




can there be another way to get how many unread messages are there in a folder

   <<Less
About | Sitemap | Contact