• Post Reply Bookmark Topic Watch Topic
  • New Topic

slow performance MimeMessage and InputStream  RSS feed

 
techjava private
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing a performance issue -

I have 10000+ records in the database
I have CLOB fields containing email header information in the database - which i need to process in my Java program using the javax.mail api's to extract sender and recipient information.
The problem is that querying is not taking long but the process of constructing a javax.mail.MimeMessage using input stream from the CLOB object is taking extremely long -

constuct query to retreive clob objects -
iterate thru the result set {
get the clob value
MimeMessage m = new MimeMessage(session,clob input stream); =>
parsing the email header information
}

The above takes 10 mins for 1000 records
2 hours for 10,000 records which is extremely slow

Please could you advise how to improve the efficiency of my code and make it perform faster?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
techjava private wrote:
Please could you advise how to improve the efficiency of my code and make it perform faster?


Since you haven't shown us any code, I'd say no.
Your first step should be to read our Enterprise Performance FAQ.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!