Hello,

I did some measurement work in SOAP/MIME area. The purpose was to determine
the performance improvements of using multi-part MIME messages for SOAP
Services.

To collect measurement results I created two clients (MimeTestClient and
TestClient) and a SOAP service (MimeTest). The client MimeTestClient sends
the file as a MIME-attachment and TestClient sends the file in a SOAP
Envelope. MimeTest SOAP service just receive the message and sends the file
back.

To support the time measuring I changed  TransportMessage.class in soap.jar
in the following way:
The method org.apache.soap.transport.TransportMessage.read() seems to
contain the parsing logic that parses XML stuff.
So I just added
long prevTime = System.currentTimeMillis();

at the beginning of the method and
System.out.println("ELAPSED  TIME:"+(System.currentTimeMillis()  - prevTime
));
at the end, just before:
return envelope;

So finally I received the following results:

Size of the file       with MIME attachment         file is inside the SOAP
envelope
1kb                    0...10ms                     10...20ms
300kb                  160...170ms                  90...120ms
900kb                  250...260ms                  150...180ms
2MB                    400...420ms                  320...340ms
3MB                    410...430ms                  700...990ms
4MB                    510...520ms                  OoM/790ms
6MB                     610...620ms                   OoM  even  with 100MB
heap
8MB                     OoM                           OoM  even  with 100MB
heap

OoM = OutOfMemory


Couple of questions:
1. Do I use correct measurement approach?
2. It is strange that after 8MB there is OoM exception on server side when
I send MIME attachment. Can somebody explain this?
3. Can somebody help me with understanding what takes so many memory in
case of big text in the SOAP envelope?


Thank you in advance
Vladimir Stemkovski
[EMAIL PROTECTED]


Reply via email to