tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Is caching tags in SimpleTags a good idea?
Date Thu, 13 Oct 2011 04:56:41 GMT
2011/10/12 David Jencks <david_jencks@yahoo.com>:
> I've been working with someone who has deeply nested SimpleTags (generated from jsp source)
that use a lot of regular Tags.  By default the jasper generated code for the SimpleTags
caches the plain Tags.  Since SimpleTags per spec are never cached and are always single-use,
it seems pretty implausible that caching the plain tags in a SimpleTag would produce a performance
benefit and indeed profiling shows it is slower than just turning off all tag caching.
>
> Does anyone have any arguments against eliminating caching for tags used in generated
SimpleTags?  If not I'll work on a patch.

I am not sure that caching plain tags at all is good for performance,
but the feature is implemented because the spec requires it.

To be more precise, it depends on a web application.  I am not
surprised that turning off caching improves performance.

If you have a single SimpleTag that generates the whole JSP page using
a lot of plain tags, I think the benefits of caching would be the same
as for a JSP page, regardless of recycling the tag.


I would like to hear some details why in you case the caching does not work.

How did you turn off the caching? There are two ways:
a) system property
b) enablePooling option of JspServlet that affects the java code that
is generated for the page.


If you would implement a feature, I think it would be something like
that "enablePooling" option of JspServlet that affects what Java code
is generated.

http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html

Best regards,
Konstantin Kolinko

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


Mime
View raw message