It does take longer if an HttpSession has to be created. But the second time is much faster. I found that accessing even just one page on deployment does make consecutive access faster. Accessing just one page that needs to create an HttpSession kills two birds with one stone.
"1st" response times stay short, even hours afterwards (with no other interaction). I have only tried Tomcat (6.0.13), Jetty(5.1.12 in eclipse) on Java 1.6.0.0 update 2 and Linux. I have chosen quick-and-dirty for now. like http://www.hibernate.org/114.html, I used a ServletContextListener to detect deployment. For our particular objective, I made it spawn a separate Thread to keep trying (for max one minute) to do a GET of a page that needs to create an HttpSession. Tomcat needs you to read at least the first line of a response to obtain the desired behavior. Howard Lewis Ship wrote: > > You can inject the ComponentSource into an ApplicationInitializer and > obtain > the page by name. There's some other cleanup I can't research now. > > It would be interesting to know exactly what is taking so long ... I think > you may find it isn't until you reference your _user field that there's a > delay, partly to set up the many necessary services, but also to create > the > HttpSession, which can be time consuming in some servers. > > On 9/13/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> Hi Howard, >> >> I'm quite ok with T5's speed when comes to page display first time, but >> it >> is really slow when a page contains : @ApplicationState private >> SessionData >> _user; loaded first time. Is there a simple way to pre-load that page? I >> know the page name, dont have to be generic. >> >> >> Howard Lewis Ship wrote: >> > >> > Should be possible at startup; there's an ApplicationInitializer chain >> of >> > command. >> > >> > You have to dive into the internals; ComponentClassResolver would need >> a >> > method that could provide the names of all pages. It knows, but >> doesn't >> > currently have an API to share that information. >> > >> > Armed with the page names, you would just have to make a bunch of calls >> to >> > ComponentSource.getPage(), then perform a little bit of cleanup work >> (so >> > that the acquired pages go back into the page pool). >> > >> > On 9/13/07, Martin_S <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/How-to-init-T5-pages-on-deployment----1st-few-hits-would-be-faster-tf4437654.html#a12665752 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Howard M. Lewis Ship > Partner and Senior Architect at Feature50 > > Creator Apache Tapestry and Apache HiveMind > > -- View this message in context: http://www.nabble.com/How-to-init-T5-pages-on-deployment----1st-few-hits-would-be-faster-tf4437654.html#a12694797 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]