• Post Reply Bookmark Topic Watch Topic
  • New Topic

First Execution of JSF taking more time

 
Dwijen Bhattacharjee
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
When I am testing My application I found that when I am executing JSF application for the first time Its taking more time .But if I close the browser and open a new browser and test again.Its taking less time than the First one.
what is the reason for that ?
Is it the reason that For the first time its create the view in the server side and next time when we open the new browser then it takes the already created view ? so its take less time.

Please confirm...

And with reference to the above metntion context what happen for Struts application? its takes the same time for all the execution.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you click on a light switch or start up a computer, there's an initial surge of electricity because it takes extra work to get things going. In the case of JSF, this extra surge comes partly from the time it takes to compile your JSF pages when they are first referenced and often also for the time it takes to get your database connections established as well. That's normal.

Nothing you do in your browser affects that. It's all on the server. And yes, Struts also has the same issues.

For straight JSP's some application servers support pre-compiling the JSPs. But that can actually slow you down when developing, since on a project with many JSPs, you'll probably have to wait for them all to compile, whether you are testing them or not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!