Bookmark Topic Watch Topic
  • New Topic

MimeMessage and input stream  RSS feed

techjava private
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am facing a performance issue constructing MimeMessage using constructor MimeMessage(session,inputstream)-

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?
Ulf Dittmer
Posts: 42972
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!