users@glassfish.java.net

Re: Compiling JSP is slow on v3

From: <glassfish_at_javadesktop.org>
Date: Wed, 08 Sep 2010 01:24:23 PDT

> By redeploy, I meant a undeploy, followed by a deploy.

I don't get it. Isn't that exactly what happens when I copy a new version of my EAR file to the autodeploy directory? When I do, [i]each[/i] JSP has a sloow startup (and is quick on a second request).

> It is just a way to force another round of
> compilations. I think the reason javac takes less
> time after redeployment, is because in V3, javac is
> invoked programmatically, and once loaded, it stays
> loaded. Hence the class loading time is minimized
> after the initial compilation. Also I suspect it
> also caches the jar files it needs for compilation.

If I understand this correctly, then only the [i]very first[/i] compilation would be slow, and [i]only[/i] after a restart of Glassfish. In other words. compiling another JSP should be faster than compiling the first JSP. I don't think I have seen that phenomenon. Or am I missing something?

> Maybe I should also turn off validation in xml parsing.

Well... my IntelliJ IDEA checks the JSP code on the fly, so if that's a big time-gobbler then perhaps I don't need another check... On the other hand, I guess we will get more informative error messages with xml parsing on, if there's a problem with a JSP? If so, that would save a lot of trouble and head-scratching, right?
[Message sent by forum member 'tmpsa']

http://forums.java.net/jive/thread.jspa?messageID=482078