Hi!
Ok, so now I've tested the Jasper performance with the 3.3 tag pooling
fix. The test was performed with a medium complexity page using lots of
iterative custom tags in a hierarchical fashion (i.e. tags within tags).
Results:
The page ran slower, and above all the response time varied greatly
(between 250ms and 460ms, whereas without tag pooling we got between
230ms and 340ms).
Looking at the generated code, I'm not particularly surprised: it uses
(it seems) a real shared tag pool, so using tags will execute code that
needs
to be synchronized.
This is a bad design. Basically, any gains you get from reusing tags are
lost due to the overhead and general performance decrease you get by
using hashtables+"synchronized".
I've looked at pages generated by other more efficient JSP compilers
(e.g. Resin), and they generally use another approach:
Only reuse a tag within a particular page, and don't use a synchronized
pool to do it. Just pass the instance around within the generated code.
What is important is not primarily the global optimization gained by
using pools, but the local optimization gained by not creating tags for
each iteration in a iterative custom tag.
This is waaaay more efficient, and also avoids the suboptimization of
trying to reuse objects using Java code, something which is more
efficiently
handled by modern JVMs' memory management (i.e. creating objects using
"new" is
pretty snappy compared with Java-coded pools).
So, please remove the tag pooling, and do it right. If you don't believe
me, do some benchmarking or something.
/Rickard
--
Rickard Öberg
Software Development Specialist
xlurc - Xpedio Linköping Ubiquitous Research Center
Author of "Mastering RMI"
Email: [EMAIL PROTECTED]