That's the expected behavior. When you change a java file, your IDE
recompiles the .class file. That, in turn, causes Tomcat (if reloadable is
true) to throw away the current set of classes in memory and do a reload.
For a simple project, this doesn't take long at all, but when you have large
frameworks getting reloaded, be it Hibernate or Hivemind, you're going to
take a performance hit.
A good rule of thumb is that if you're trying to hot-patch live code
on a regular basis, take a step back and work a bit on your coding
practices. Especially if you come from a dynamic language background like
perl or ruby it's tempting to just start hacking the code of a running
program. That's not usually the best approach with java though, despite the
fact that with a modern IDE and debugger you can work this way.
Generally speaking you're better off making a bunch of changes at
once, doing a recompile, and testing, rather than trying to hot fix them one
at a time.
--- Pat
> -----Original Message-----
> From: Bryan Lewis [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 16, 2006 8:18 PM
> To: Tapestry users
> Subject: Re: First page display slowdown in v 4.0
>
> Yes, I tried that. Whenever I changed a java file, the app context got
> restarted which was rather slow. Took 10 seconds for the app to be
> ready to use again. Is that what's supposed to happen? I was hoping
> for something like a one-second reload of just the one file that changed.
>
>
> Patrick Casey wrote:
>
> > Did you set reloadable="true" in your web.xml?
> >
> > --- Pat
> >
> >
> >
> >>-----Original Message-----
> >>From: Bryan Lewis [mailto:[EMAIL PROTECTED]
> >>Sent: Monday, January 16, 2006 5:29 PM
> >>To: Tapestry users
> >>Subject: Re: First page display slowdown in v 4.0
> >>
> >>I must be doing something wrong then. I've tried three app servers,
> >>currently trying JBoss/Tomcat. Running inside Eclipse, starting in
> >>debug mode. I have Tapestry's caching disabled in the startup
> >>properties, and changes to the html or page files do take effect
> >>immediately. But when I make a small change inside a Java method... it
> >>does get built automatically, and the class file does get updated in
> >>the webapp tree. But the change doesn't show up in the browser until I
> >>restart the server or reload the app.
> >>
> >>
> >>Alexander Varakin wrote:
> >>
> >>
> >>
> >>>Hot-code-replace feature is available in Eclipse if you run web
> container
> >>>
> >>>
> >>in
> >>
> >>
> >>>debug mode. The problem is that it takes twice longer to display first
> >>>
> >>>
> >>page
> >>
> >>
> >>>in debug mode. Also Hot-code-replace works only if you don't touch
> >>>
> >>>
> >>function
> >>
> >>
> >>>declarations.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]