You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Manoj Prakash <ma...@coreobjects.com> on 2005/09/03 13:28:06 UTC

Performance problem : simple tapestry page takes long time to show up

We have been using tapestry for over 1.5 years now for our app and recently we 
have started performance testing of this app. There are some interesting 
observations.

Background/Environment:
Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 beta 4.
Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server from 
different network.

App: The first page of the app is a simplest login page, the html template is 
mostly static - has html form, refers a .css file, few images and input 
validation script( using tapestry's support for validation). We create a 
session ( by calling getVisit() ) on the login page itself before it is 
rendered.


Problem: 
One a new browser instance, this login page takes consistently 18 to 20 
seconds to show up. Tomcat access log shows that it is taking upto 5 seconds 
to process the login page request, another 5 seconds to process the request 
for validator.js, and almost negligible time to process the get requests for 
images and .css file. We are wondering why tomcat/tapestry is taking 5 seconds 
to process the Get request for such a simple page.

To rule out the network and tomcat, and other factors for this performance, we 
added a similar static html file, and a similar .jsp file in our webapp, and 
both show up within 3-4 seconds. Tomcat log in those cases show that it took 
only milliseconds to process the get request for .html and .jsp file.

Any idea why this could be happening ? Is tapestry doing some heavy 
initialization work when a session is created? ( View source of the page in 
browser has 0 millisecond at the bottom as the render time).

Thanks,
Manoj





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Performance problem : simple tapestry page takes long time to show up

Posted by kranga <kr...@k2d2.org>.
1) The render time in the bottom of the page is totally misleading. It tells
you how long it took for Tapestry to execute the code that produces the HTML
inside the shell component. That is all. If you have an activate or anything
precomputed before the shell is invoked (rewind cycle for instance), that is
not reflected. The web server access logs will give you a better idea of
performance.

2) I don't understand why you think this is a Tapestry problem. Sounds like
something is wrong in your Tomcat installation. You say that a .jsp page
takes between 3 to 4 seconds while the Tapestry page takes 5 seconds. So
clearly your Tomcat installation has issues.

----- Original Message ----- 
From: "Manoj Prakash" <ma...@coreobjects.com>
To: <ta...@jakarta.apache.org>
Sent: Saturday, September 03, 2005 7:28 AM
Subject: Performance problem : simple tapestry page takes long time to show
up


> We have been using tapestry for over 1.5 years now for our app and
recently we
> have started performance testing of this app. There are some interesting
> observations.
>
> Background/Environment:
> Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 beta
4.
> Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server from
> different network.
>
> App: The first page of the app is a simplest login page, the html template
is
> mostly static - has html form, refers a .css file, few images and input
> validation script( using tapestry's support for validation). We create a
> session ( by calling getVisit() ) on the login page itself before it is
> rendered.
>
>
> Problem:
> One a new browser instance, this login page takes consistently 18 to 20
> seconds to show up. Tomcat access log shows that it is taking upto 5
seconds
> to process the login page request, another 5 seconds to process the
request
> for validator.js, and almost negligible time to process the get requests
for
> images and .css file. We are wondering why tomcat/tapestry is taking 5
seconds
> to process the Get request for such a simple page.
>
> To rule out the network and tomcat, and other factors for this
performance, we
> added a similar static html file, and a similar .jsp file in our webapp,
and
> both show up within 3-4 seconds. Tomcat log in those cases show that it
took
> only milliseconds to process the get request for .html and .jsp file.
>
> Any idea why this could be happening ? Is tapestry doing some heavy
> initialization work when a session is created? ( View source of the page
in
> browser has 0 millisecond at the bottom as the render time).
>
> Thanks,
> Manoj
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Performance problem : simple tapestry page takes long time to show up

Posted by Adam Greene <ag...@iq-2000.com>.
I have seen this discussion on and off over the last year and each time
someone almost always asks this question, it may seem obvious, but it must
be asked none the less :-)

Are you sure that you have not disabled caching within tapestry with
the -Dorg.apache.tapestry.disable-caching command line option?

I am currently profiling Tapestry 4.0 Beta 5 and have come up with this
interesting bit of information:

On the initial page request, it takes 72 seconds (because of profiling
overhead, normally 9 secs, after loaded responses are about 1sec). Of
those 72 seconds, 22-25 seconds of it is one method call:
java.util.Locale.getAvailableLocales(), which is totally outside the scope
of Tapestry, but the call may be removable.  I am testing that now.  The
second biggest CPU hog is SpecificationSource.getApplicationNameSpace, at 1
second average time and   ElementsProxyList.size at 3.8 seconds Base Time
(less than 0.09sec average time).

On subsequent calls Tapestry took only 1.89sec cummulative time with the
profiler active and given the formula of 72sec vs 9sec, that would normally
be 0.23secs per request without profiler load.  And that request renders
two velocity macros via hivemind services, and construct a Rich Text Editor
from 4 different script files requiring a processing 30Kb of script with
50 string replacements and 30 asset lookups after submitting the text that 
had
been edited in the Rich Text Editor.  So it better than a "Hello World" test 
and
shows just how fast Tapestry 4.0 can be, even when under the load of a 
profiler :-)

----- Original Message ----- 
From: "Manoj Prakash" <ma...@coreobjects.com>
To: <ta...@jakarta.apache.org>
Sent: Saturday, September 03, 2005 8:28 AM
Subject: Performance problem : simple tapestry page takes long time to show
up


> We have been using tapestry for over 1.5 years now for our app and
> recently we
> have started performance testing of this app. There are some interesting
> observations.
>
> Background/Environment:
> Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 beta
> 4.
> Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server from
> different network.
>
> App: The first page of the app is a simplest login page, the html template
> is
> mostly static - has html form, refers a .css file, few images and input
> validation script( using tapestry's support for validation). We create a
> session ( by calling getVisit() ) on the login page itself before it is
> rendered.
>
>
> Problem:
> One a new browser instance, this login page takes consistently 18 to 20
> seconds to show up. Tomcat access log shows that it is taking upto 5
> seconds
> to process the login page request, another 5 seconds to process the
> request
> for validator.js, and almost negligible time to process the get requests
> for
> images and .css file. We are wondering why tomcat/tapestry is taking 5
> seconds
> to process the Get request for such a simple page.
>
> To rule out the network and tomcat, and other factors for this
> performance, we
> added a similar static html file, and a similar .jsp file in our webapp,
> and
> both show up within 3-4 seconds. Tomcat log in those cases show that it
> took
> only milliseconds to process the get request for .html and .jsp file.
>
> Any idea why this could be happening ? Is tapestry doing some heavy
> initialization work when a session is created? ( View source of the page
> in
> browser has 0 millisecond at the bottom as the render time).
>
> Thanks,
> Manoj
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Performance problem : simple tapestry page takes long time to show up

Posted by Konstantin Iignatyev <kg...@yahoo.com>.
This is very strange.
Could it be that you have tied Hibernate SessionFactory creation to the  
Visit object creation. In this case  first attempt to access
Visit will take a long time especially if Hibernate configuration has 
hbm2ddl set to create/validate DB schema.

Normally you would need only one Hibernate SessionFactory for all user 
sessions.

Javier Sanchez wrote:
> I am suffering the same problem on my current project (Tapestry 3.0.4,
> Hibernate 2.1.8, Oracle 9iR2, JBoss 3.2.7, Tomcat 5.0).  We have been
> doing intensive testing on every thing for weeks without results.
>
> Did you ever solve this problem?   Any comments are welcome.
>
> JAVIER SANCHEZ
> Bogota, Colombia
>
> On 9/3/05, Manoj Prakash <ma...@coreobjects.com> wrote:
>> We have been using tapestry for over 1.5 years now for our app and 
>> recently we
>> have started performance testing of this app. There are some interesting
>> observations.
>>
>> Background/Environment:
>> Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 
>> beta 4.
>> Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server 
>> from
>> different network.
>>
>> App: The first page of the app is a simplest login page, the html 
>> template is
>> mostly static - has html form, refers a .css file, few images and input
>> validation script( using tapestry's support for validation). We create a
>> session ( by calling getVisit() ) on the login page itself before it is
>> rendered.
>>
>>
>> Problem:
>> One a new browser instance, this login page takes consistently 18 to 20
>> seconds to show up. Tomcat access log shows that it is taking upto 5 
>> seconds
>> to process the login page request, another 5 seconds to process the 
>> request
>> for validator.js, and almost negligible time to process the get 
>> requests for
>> images and .css file. We are wondering why tomcat/tapestry is taking 
>> 5 seconds
>> to process the Get request for such a simple page.
>>
>> To rule out the network and tomcat, and other factors for this 
>> performance, we
>> added a similar static html file, and a similar .jsp file in our 
>> webapp, and
>> both show up within 3-4 seconds. Tomcat log in those cases show that 
>> it took
>> only milliseconds to process the get request for .html and .jsp file.
>>
>> Any idea why this could be happening ? Is tapestry doing some heavy
>> initialization work when a session is created? ( View source of the 
>> page in
>> browser has 0 millisecond at the bottom as the render time).
>>
>> Thanks,
>> Manoj
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Performance problem : simple tapestry page takes long time to show up

Posted by Javier Sanchez <ja...@gmail.com>.
I am suffering the same problem on my current project (Tapestry 3.0.4,
Hibernate 2.1.8, Oracle 9iR2, JBoss 3.2.7, Tomcat 5.0).  We have been
doing intensive testing on every thing for weeks without results.

Did you ever solve this problem?   Any comments are welcome.

JAVIER SANCHEZ
Bogota, Colombia

On 9/3/05, Manoj Prakash <ma...@coreobjects.com> wrote:
> We have been using tapestry for over 1.5 years now for our app and recently we
> have started performance testing of this app. There are some interesting
> observations.
>
> Background/Environment:
> Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 beta 4.
> Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server from
> different network.
>
> App: The first page of the app is a simplest login page, the html template is
> mostly static - has html form, refers a .css file, few images and input
> validation script( using tapestry's support for validation). We create a
> session ( by calling getVisit() ) on the login page itself before it is
> rendered.
>
>
> Problem:
> One a new browser instance, this login page takes consistently 18 to 20
> seconds to show up. Tomcat access log shows that it is taking upto 5 seconds
> to process the login page request, another 5 seconds to process the request
> for validator.js, and almost negligible time to process the get requests for
> images and .css file. We are wondering why tomcat/tapestry is taking 5 seconds
> to process the Get request for such a simple page.
>
> To rule out the network and tomcat, and other factors for this performance, we
> added a similar static html file, and a similar .jsp file in our webapp, and
> both show up within 3-4 seconds. Tomcat log in those cases show that it took
> only milliseconds to process the get request for .html and .jsp file.
>
> Any idea why this could be happening ? Is tapestry doing some heavy
> initialization work when a session is created? ( View source of the page in
> browser has 0 millisecond at the bottom as the render time).
>
> Thanks,
> Manoj
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Performance problem : simple tapestry page takes long time to show up

Posted by Patrick Casey <pa...@adelphia.net>.
	Manoj,

	A couple of things to check (in no particular order):

	1) Does the render time for a page change significantly between the
first *ever* render of that page within the JVM and subsequent renders? E.g.
if I hit the "refresh" button does the second render go materially faster?
	2) Are you running any additional frameworks (like Hibernate) that
load on demand? If so they usually won't go through their (expensive)
initialization until the first page load of your app. Thus, in most of my
apps for example, first load takes 5.5 seconds (0.5 seconds for page, 5
seconds for Hibernate) and subsequent loads are fast.
	3) Did you try instrumenting response time yourself? Override
HttpServlet and put your own timer and logging code around the doService
method. This will give you the *actual* amount of time the request handling
took, but will factor out Tomcat time and network time which will give you a
more accurate baseline to compare.
	4) Do you have the Tapestry page pool off?

	--- Pat

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Manoj Prakash
> Sent: Saturday, September 03, 2005 4:28 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Performance problem : simple tapestry page takes long time to
> show up
> 
> We have been using tapestry for over 1.5 years now for our app and
> recently we
> have started performance testing of this app. There are some interesting
> observations.
> 
> Background/Environment:
> Server : P4 2.8 GHz,1 GB RAM, Windows xp, Tomcat 4.1.30, Tapestry 3.0 beta
> 4.
> Clients : P4 XP/Win2k machines with 512 MB RAM, accessing the server from
> different network.
> 
> App: The first page of the app is a simplest login page, the html template
> is
> mostly static - has html form, refers a .css file, few images and input
> validation script( using tapestry's support for validation). We create a
> session ( by calling getVisit() ) on the login page itself before it is
> rendered.
> 
> 
> Problem:
> One a new browser instance, this login page takes consistently 18 to 20
> seconds to show up. Tomcat access log shows that it is taking upto 5
> seconds
> to process the login page request, another 5 seconds to process the
> request
> for validator.js, and almost negligible time to process the get requests
> for
> images and .css file. We are wondering why tomcat/tapestry is taking 5
> seconds
> to process the Get request for such a simple page.
> 
> To rule out the network and tomcat, and other factors for this
> performance, we
> added a similar static html file, and a similar .jsp file in our webapp,
> and
> both show up within 3-4 seconds. Tomcat log in those cases show that it
> took
> only milliseconds to process the get request for .html and .jsp file.
> 
> Any idea why this could be happening ? Is tapestry doing some heavy
> initialization work when a session is created? ( View source of the page
> in
> browser has 0 millisecond at the bottom as the render time).
> 
> Thanks,
> Manoj
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org