Disabling reloading of the webapp did not help?
When I use hot code replacement I always disable reloading, so my webapp is
updated instantly. (Not always, eg. annotation changes are applied only on
restart for some reason... :(
BR,
Norbi
----- Original Message -----
From: "Bryan Lewis" <[EMAIL PROTECTED]>
To: "Tapestry users" <tapestry-user@jakarta.apache.org>
Sent: Wednesday, January 18, 2006 4:37 PM
Subject: Re: First page display slowdown in v 4.0
I see the 'Hot Code Replace' section and the options are all checked.
When I save a modified java file, it does get built and the .class file
does get updated in the exploded webapp tree. This causes Tomcat to
reload the app -- my ServletContextListener methods tell me that the
context has been destroyed and re-initialized -- which takes less than a
second.
The "problem" is on my next access of the app in the browser. Maybe
some apps would go faster, but mine takes about 10 seconds while things
get reconstructed: a session, visit, Cayenne DataContext, and the page
(running with disable-caching), after which I get re-logged-in with a
cookie. Our apps are definitely not stateless.
That's fine. A 10-second turn-around, totally automatic. I'm content
with it now. It's certainly better than restarting the app server as
well as the app, which takes over a minute.
Thanks!
Schulte Marcus wrote:
The instant turn-around works *without* app-reloading. And I'm guilty of
liking it - without being a Ruby fan.
It's a feature of Eclipse and the JDK (>=1.4). Have a look at
Preferences/Java/Debug.
-----Original Message-----
From: Bryan Lewis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 17, 2006 6:30 PM
To: Tapestry users
Subject: Re: First page display slowdown in v 4.0
I hear what you're saying! I prefer the good old
compiled-strong-type-checking Java approach... not a fan of perl,
haven't tried ruby. I don't even like annotations yet. :-) But I saw
some comments on the web that appeared to be promising instant
turn-around for simple edits and I wanted it if I could get
it. Up till
now I've been happy with instant turn-around for html/page
edits. I can
live with an auto-reload after a code change, now that I know that's
what people are talking about.
Thanks for the clarification.
Patrick Casey wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/233 - Release Date: 2006. 01.
18.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]