tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casey Lucas" <clu...@armassolutions.com>
Subject [PATCH] custom tag performance problem
Date Sun, 11 Feb 2001 19:54:44 GMT

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.

Mime
View raw message