You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Marc Saegesser <ma...@apropos.com> on 2001/03/01 17:35:34 UTC

RE: [PATCH] custom tag performance problem

Casey,

I'm reviewing this patch for possible inclusion in Tomcat 3.2.2.  Its a
little late in the game to be changing things, but the patch looks OK.

Is is possible for you to provide the pages that you used for your test runs
so that I can test this more thoroughly?

Marc Saegesser


> -----Original Message-----
> From: Casey Lucas [mailto:clucas@armassolutions.com]
> Sent: Sunday, February 11, 2001 1:55 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: [PATCH] custom tag performance problem
>
>
>
> It's great to see that the 3.2.2 beta is out but it was sad
> to see that there's still a performance problem in certain
> situations with custom tags.  I submitted the patch a few
> weeks back but I'm sure you all are very busy.
>
> So, given the recent threads about performance, I'll plea
> my case again...
>
> The problem should be apparent in at least two situations:
>
> 1. if you are using custom tags that derive from
> BodyTagSupport and have larger than 8K body.
>
> 2. if you are using a lot of nested tags (e.g. inside
> iteration type tags.)
>
> Basically the problem is that BodyContentImpl allocates
> a new buffer in situations where it doesn't need to.  This
> causes a lot of 8K or larger buffers to be used -- ouch.
>
> After applying the patch, my test runs went from spending
> an average of 17% time in BodyContentImpl.reAllocBuff and
> BodyContentImpl.clear to spending an average of 5.6% time
> in BodyContentImpl.reAllocBuff (clear had almost 0% time.)
>
>
> I've attached the patch for BodyContentImpl.java.
>
>