cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayank Mishra (JIRA)" <>
Subject [jira] Created: (CXF-1916) Mtom Performance - MimeBodyPartInputStream performs slow
Date Mon, 17 Nov 2008 06:28:44 GMT
Mtom Performance - MimeBodyPartInputStream performs slow

                 Key: CXF-1916
             Project: CXF
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.0.7
         Environment: Windows XP, Java SE 1.6.0_06
            Reporter: Mayank Mishra
            Priority: Minor

MimeBodyPartInputStream doesn't implements read(byte[]), hence it delegates it to parent InputStream
class. InputStream's read(byte[]) runs over a for loop, eventually delegating to PushBackInputStream,
which reads a single byte and performs boundary matching over that Byte.

A simple test program which takes the time taken by the MimeBodyPartInputStream to read from
a loaded buffer shows that MimeBodyPartInputStream takes ~1200-1400 ms to read a 12MB buffer.
On the other hand, an InputStream takes around ~100-150ms to do so. I can understand that
MimeBodyPartInputStream has the logic of detecting a probable boundary and it performs multiple
if checks to do so, also it calls read and unread over PushBackInputStream. But counting the
reads and unreads also, the time of MimeBodyPartInputStream looks poor.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message