Just curious... why did you take out the buffer size double?  Is that too
much memory to sacrifice?  Someone ? recently sent this in as a performance
improvement patch.

You know I love anything that makes tags faster. :)

-Casey

[EMAIL PROTECTED] wrote:
> 
> costin      01/03/21 11:51:06
> 
>   Modified:    src/share/org/apache/jasper/runtime BodyContentImpl.java
>   Log:
>   Lucky fix - it shows up for some JSPs generating a lot of content.
>   Nacho - nice tuneup ( remove double copy ), you forgot one line :-)
> 
>   Revision  Changes    Path
>   1.9       +4 -1      
>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.8
>   retrieving revision 1.9
>   diff -u -r1.8 -r1.9
>   --- BodyContentImpl.java      2001/03/10 01:20:23     1.8
>   +++ BodyContentImpl.java      2001/03/21 19:50:51     1.9
>   @@ -113,7 +113,8 @@
> 
>         if (len <= Constants.DEFAULT_BUFFER_SIZE) {
>             tmp = new char [bufferSize + Constants.DEFAULT_BUFFER_SIZE];
>   -         bufferSize = bufferSize * 2;
>   +         //      bufferSize = bufferSize * 2;
>   +         bufferSize += Constants.DEFAULT_BUFFER_SIZE;
>         } else {
>             tmp = new char [bufferSize + len];
>             bufferSize += len;
>   @@ -179,6 +180,8 @@
>             if (len >= bufferSize - nextChar)
>                 reAllocBuff(len);
> 
>   +         //System.out.println("XXX " + off + " " + (off+len) + " " +
>   +         // nextChar + " " + bufferSize + " "+  cb.length);
>                s.getChars(off, off + len, cb, nextChar);
>             nextChar += len;
>            }
> 
> 
>

Reply via email to