Re: Profiling Tapestry

"Luis Neves" <[email protected]> Tue, 19 Feb 2002 20:52:42 -0000
Newsgroups gmane.comp.java.tapestry.contrib
Message-ID <000901c1b987$5feee5e0$6401a8c0@2KP2020>
I stopped measuring "Elapsed Time" and started measuring "CPU Time" 
and the results are making more sense, also I pick a very simple page 
(it's only a static page with a Tapestry BasePage associated) in order 
do reduce the noise ,and because I've always been curious as to why 
Tapestry works so hard with pages that are mostly static, I mean, no 
matter how complex a page is, Tapestry always seems to do the same 
effort.

It looks like what's keeping Tapestry down is the use of 
PrintWriter.
See:

<http://pwp.netcabo.pt/lneves/tapestry_Run2.html>

I remember sometime ago reading a paper from Sun about servlet 
performance where they conclude (among other things):

- Converting chars to bytes is *very slow*
- Always use OutputStream, never PrintWriter
- Store bytes, not characters

Ok ... I know ... This is probably preaching to the choir :-)
The paper is online:
<http://java.sun.com/javaone/javaone2001/pdfs/551.pdf>

The problem is of course that PrintWriter may very well be the only 
thing available that Tapestry can use ... and in that case we are 
screewed :-)


Best regards,
Luis Neves



----- Original Message ----- 
From: "Luis Neves" <[email protected]>
To: "Tapestry Contrib" <tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Tuesday, February 19, 2002 3:38 PM
Subject: [Tapestry-contrib] Profiling Tapestry


> 
> I'm trying out the JProbe profiler suite using a Tapestry Application 
> ( using a "net.sf.tapestry" filter) and it seems that Tapestry spends 
> most of the time sleeping :-) , see here:
> 
> <http://pwp.netcabo.pt/lneves/tapestry_Run.html>
> 
> The big offender seems to be the JanitorThread used by the Tapestry 
> Pool.
> Does this make sense? I have no idea of how to interpret the 
> results... it seems that using a profiler is somekind of a black art.
> 
> Best regards,
> Luis Neves
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: Geek Gift Procrastinating?
> Get the perfect geek gift now!  Before the Holidays pass you by.
> T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
> _______________________________________________
> Tapestry-contrib mailing list
> Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/tapestry-contrib


-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/