axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rineh...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java HTTPSender.java
Date Wed, 07 Nov 2001 19:21:46 GMT
rineholt    01/11/07 11:21:46

  Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
                        HTTPSender.java
  Log:
  This should give some performance boost by trading off a small
  amount of memory to guarantee full network packets are used.  Verified
  this using MS Network monitor. Also force data to be flushed immediately
  to network after writting.
  
  Revision  Changes    Path
  1.60      +2 -0      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- AxisServlet.java	2001/11/06 20:06:02	1.59
  +++ AxisServlet.java	2001/11/07 19:21:46	1.60
  @@ -299,6 +299,7 @@
           ServletConfig  config  = getServletConfig();
           ServletContext context = config.getServletContext();
           HttpSession    session = req.getSession();
  +        res.setBufferSize(1024 * 8); //provide performance boost.       
   
           if (engine == null)
               engine = (AxisEngine)context.getAttribute(AXIS_ENGINE);
  @@ -427,5 +428,6 @@
             res.setContentLength( msg.getContentLength() );
             msg.writeContentToStream(res.getOutputStream());
           }
  +        res.flushBuffer(); //Force it right now.
       }
   }
  
  
  
  1.31      +4 -1      xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
  
  Index: HTTPSender.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- HTTPSender.java	2001/11/06 20:06:02	1.30
  +++ HTTPSender.java	2001/11/07 19:21:46	1.31
  @@ -64,6 +64,7 @@
   import org.apache.log4j.Category;
   
   import java.io.BufferedInputStream;
  +import java.io.BufferedOutputStream;
   import java.io.BufferedWriter;
   import java.io.IOException;
   import java.io.InputStream;
  @@ -207,7 +208,8 @@
   
   
               BufferedInputStream inp = new BufferedInputStream(sock.getInputStream());
  -            OutputStream  out  = sock.getOutputStream();
  +                       //Should help performance. Temporary fix only till its all stream
oriented.
  +            OutputStream  out  = new BufferedOutputStream(sock.getOutputStream(), 8*1024);
               StringBuffer  otherHeaders = new StringBuffer();
               String        userID = null ;
               String        passwd = null ;
  @@ -284,6 +286,7 @@
   
               out.write( header.toString().getBytes() );
               reqMessage.writeContentToStream(out);
  +            out.flush();
   
               category.debug( "XML sent:" );
               category.debug( "---------------------------------------------------");
  
  
  

Mime
View raw message