Thanks for your response! On Oct 12, 2011, at 9:56 PM, Konstantin Kolinko wrote:
> 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. > I haven't been able to find any spec language that requires caching of plain tags, can you point me to it? I thought they just had to be cacheable, not that the container had to cache them. > 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. > Well, that makes some sense :-) Maybe we'll stick with the enable pooling option for the code generation. > > I would like to hear some details why in you case the caching does not work. It works, but there are something like 40 simple tags each with several plain tags used once to generate the jsp page. There's noticeable overhead creating the tag cache objects for the simple tags. > > 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. we changed the code generation. > > > 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 many thanks! david jencks > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org