2011/10/12 David Jencks <david_jen...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org