You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/10/29 13:20:50 UTC
DO NOT REPLY [Bug 24214] New: -
Axis performance reading socket input stream
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24214>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24214
Axis performance reading socket input stream
Summary: Axis performance reading socket input stream
Product: Axis
Version: 1.1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Enhancement
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: a.fernandez.martinez@ibermatica.com
Local and remote machines as SOAP client and server: PIII@800MHz, over a local
100 MBit ethernet.
A small SOAP message is sent (sequentially) a number of times. Axis was making
about 3 requests/second over a local 100 MBit ethernet. Quite insufficient for
any real-world application.
After looking for the bottleneck, the class org.apache.axis.SOAPPart seems to be
the culprit. Specifically this snippet from getAsBytes():
// Assumes we don't need a content length
try {
InputStream inp = null;
byte[] buf = null;
try{
inp = (InputStream) currentMessage ;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
buf = new byte[4096];
int len ;
while ( (len = inp.read(buf,0,4096)) != -1 )
baos.write( buf, 0, len );
buf = baos.toByteArray();
}finally{
if(inp != null &&
currentMessage instanceof
org.apache.axis.transport.http.SocketInputStream )
inp.close();
}
setCurrentForm( buf, FORM_BYTES );
log.debug("Exit: SOAPPart::getAsBytes");
return (byte[])currentMessage;
}
catch( Exception e ) {
log.error(Messages.getMessage("exception00"), e);
}
Patch and test will be attached once I figure out how.