Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JavaMail: Fast mail searching

Reply
Thread Tools

JavaMail: Fast mail searching

 
 
Tim Terry
Guest
Posts: n/a
 
      03-14-2005
I currently maintain a web based email client which uses the JavaMail
API to interface with POP3 mailboxes. I'm using the standard sun POP3
provider. I have created a user definable filter for message's subject
or sender address. I've found that using the 'folder.search(SearchTerm)'
method to be slow on mailboxes with more than 500 messages. I'm
considering using a temp table in a database to filter messages in SQL,
but i will still have to get the messages into and out of the table. Are
there any POP3 providers with faster methods for searching? I'm
interested in how use of the JavaMail can be optimised for faster
performance regards searching messages.

Thanks in advance,

Tim
 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      03-15-2005
Tim Terry wrote:
> I currently maintain a web based email client which uses the JavaMail
> API to interface with POP3 mailboxes. I'm using the standard sun POP3
> provider. I have created a user definable filter for message's subject
> or sender address. I've found that using the 'folder.search(SearchTerm)'
> method to be slow on mailboxes with more than 500 messages.


Before you start to optimize find out what exactly is it that slows
things down. If it is e.g. the POP3 server, than all your optimization
on the client side is a waste of time.

/Thomas


--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
 
Reply With Quote
 
 
 
 
Tim Terry
Guest
Posts: n/a
 
      03-15-2005
Thomas Weidenfeller wrote:
> Tim Terry wrote:
>
>> I currently maintain a web based email client which uses the JavaMail
>> API to interface with POP3 mailboxes. I'm using the standard sun POP3
>> provider. I have created a user definable filter for message's subject
>> or sender address. I've found that using the 'folder.search(SearchTerm)'
>> method to be slow on mailboxes with more than 500 messages.

>
>
> Before you start to optimize find out what exactly is it that slows
> things down. If it is e.g. the POP3 server, than all your optimization
> on the client side is a waste of time.
>
> /Thomas
>
>

Thanks for the reply. From what I can see the slow down is due to disk
activity when reading the user's mailbox, as the POP3 server (qmail) is
on the same host as tomcat this would rule out network problems
(hopefully). The Java processes are also not using up much CPU time
while the filtering is taking place. This is Linux box running XFS if
that helps. Could reading the mailbox be made quicker without upgrading
hardware such as faster disks? I'm not interested in the content of each
email just the subject and from address headers.

Tim
 
Reply With Quote
 
GaryM
Guest
Posts: n/a
 
      03-15-2005
Tim Terry <(E-Mail Removed)> wrote in
news:4236e9f3$0$8743$(E-Mail Removed):

> Thanks for the reply. From what I can see the slow down is due to
> disk activity when reading the user's mailbox, as the POP3 server
> (qmail) is on the same host as tomcat this would rule out network
> problems (hopefully). The Java processes are also not using up
> much CPU time while the filtering is taking place. This is Linux
> box running XFS if that helps. Could reading the mailbox be made
> quicker without upgrading hardware such as faster disks? I'm not
> interested in the content of each email just the subject and from
> address headers.


Javamail should not be grabbing the bodies of the message. So it should
not be a disk intensive process to retrieve a mere 500 message headers,
assuming the machine is not underpowered. You might want to run tcpdump
and ensure the bodies are not being accessed.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google search result to be URL-limited when searching site, but notwhen searching Web stumblng.tumblr Javascript 1 02-04-2008 09:01 AM
[ANN] FastRI 0.1.1 (fast+smart ri docs searching): configurable search strategies Mauricio Fernandez Ruby 3 11-10-2006 11:19 PM
Berkeley DB XML vs 4suite for fast searching in XML DB? Sullivan WxPyQtKinter Python 1 04-02-2006 02:23 AM
Searching for a very fast string parser |MKSM| Ruby 5 03-09-2006 02:45 PM
Looking for fast string hash searching Thomas Christmann C Programming 4 05-16-2004 02:18 PM



Advertisments