As a quick note, I did some Jasper profiling on a previous project (it was Jasper from 3.1, running inside weblogic 5.1). The single biggest runtime cost, was all the calls to Introspector.getBeanInfo(). I created a cache of these using a similar technique to FastHashMap in commons collections (in Fast mode), and lowered the runtime costs significantly (for the calls i looked at say, 60%! (I think)). It was a trivial fix for the large benefit. Introspector does all the work every time, and instantiates a new BeanInfo for each call. Also, the cache only needs to expand to contain all the tag classes - a fairly small, finite set.
I didn't submit it before, as it was at the time of Jasper4 / tag pooling being touted and thought the heavy runtime reflection stuff would be obsolete soon... -----Original Message----- From: costinm Sent: 27 March 2002 22:54 To: tomcat-dev; Kin-Man.Chung Cc: costinm Subject: Re: tag pooling question On Wed, 27 Mar 2002, Kin-Man Chung wrote: > Pulling codes out of iteration tag bodies is very high on my list of > optimizations that I wnat to do. I don't think we can do much about > general scriplets that contain loops, though. > > But before we start on jasper optimization work, we'll need benchmarks > and performance analysers. I have learnt from experience that performance > improvement often comes from surprising places, and that optimizations > done at the wrong time and place often do more harm than good. Benchmarks > would give us some real metric for us to measure our optimization work, > and analyzing tools would let us identify hot spots that need to be improved. > > I'd appreciate comments, suggestions, and pointers on these two subjects. > I'd also appreciate if anyone can donate some real life applications that > I can use for benchmarking jasper performance. The most usefull tools are OptimizeIt and ab. Simple pages would help much better then complex pages - first find out what's the overhead of executin a simple JSP page, with no tags, compare it with the equivalent servlet ( HelloWorld ), and find out what's wrong. Then use a simple hello world Tag, compare it with the equivalent servlet ( or JSP not using tags ), and find what's wrong. Same for a simple iteration tag, compared with a scriptlet If you solve those simple problems, and get the tag version in a reasonable limit, I think we'll all be very happy ( 30% slower would be acceptable for me, even 1/2 the speed of the equivalent scriptlet ). Going after 'real life applications' when the simple hello world tag, or a simple empty jsp page has a clear performance penalty would be a waste of time. ( all that with a reasonable load - I sugest 80 concurent requests ) Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>