tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime BodyContentImpl.java
Date Sat, 10 Mar 2001 01:20:24 GMT
nacho       01/03/09 17:20:24

  Modified:    src/share/org/apache/jasper/runtime BodyContentImpl.java
  Log:
    One last performance update to the previous commit.
  
    Double the buffer size on a realloc instead of incrementing the length.
  
    Submitted by:	Andrew Gilbert [andrew@soundbite.com]
  
  Revision  Changes    Path
  1.8       +3 -3      jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java
  
  Index: BodyContentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BodyContentImpl.java	2001/03/01 00:59:54	1.7
  +++ BodyContentImpl.java	2001/03/10 01:20:23	1.8
  @@ -88,7 +88,7 @@
           super(writer);
   	cb = new char[bufferSize];
   	nextChar = 0;
  -    }
  +	 }
   
       /**
        * Write a single character.
  @@ -105,7 +105,7 @@
   
       private void reAllocBuff (int len) {
           //Need to re-allocate the buffer since it is to be
  -	//unbounded according to the updated spec..
  + 	//unbounded according to the updated spec..
   
           char[] tmp = null;
   
  @@ -113,7 +113,7 @@
   
   	if (len <= Constants.DEFAULT_BUFFER_SIZE) {
   	    tmp = new char [bufferSize + Constants.DEFAULT_BUFFER_SIZE];
  -	    bufferSize += Constants.DEFAULT_BUFFER_SIZE;
  +	    bufferSize = bufferSize * 2;
   	} else {
   	    tmp = new char [bufferSize + len];
   	    bufferSize += len;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Mime
View raw message