- This topic has 5 replies, 2 voices, and was last updated 19 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
matesoMemberMy JSPs are validating/compiling very slowly. It takes about 3 seconds for a simple JSP which contains all HTML (i.e. no tags). I am running with 512MB of memory in the vm args. I have a 3GHz Pentium 4 with 2GB of memory. Javac uses roughly 50-70% of my CPU for each JSP it’s compiling. My project is taking hours to do a full build where all of the JSPs are validated. I was previously using JBossIDE to compile jsps (it’s now disabled), and it took only a few minutes to compile all of my JSPs (thus pointing to not a system issue).
Details of my install are below:
What operating system and version are you running? – Window XP
What Eclipse version and build id are you using? Version: 3.1.0
Build id: I20050627-1435– Was Eclipse freshly installed for MyEclipse? – Yes
– Are any other external plugins installed? – No
– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.* – 4What MyEclipse version are you using? – Version: 3.9.310
Build id: 20050808-4.0-Milestone-3What JDK version are you using to run Eclipse? (java -version) –
java version “1.5.0_03”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
BEA JRockit(R) (build dra-45238-20050523-2021-win-ia32, R25.2.0-28)What JDK version are you using to launch your application server? – Same as above
What steps did you take that resulted in the issue? – Validated JSPs
What application server are you using? – JBoss
Are there any exceptions in the Eclipse log file? – No
matesoMemberAs a workaround if there is nothing that can be done to speed up the JSP validation, how do I exclude a specific directory from validation within my web project? I have one directory which has about 6500 JSPs of mainly HTML, which is taking over 5 hours to compile. If I could exclude that directory from validation, then I could live with the slow compilation for the other JSPs in my system.
matesoMemberFollowing up, it takes about 7 or 8 seconds for a more complicated JSP to be validated. This is seriously hindering my devleopment efforts. Help would be appreciated. I am using BEA jrockit as my JDK and there are no issues with compiling JSPs external to eclipse.
Riyad KallaMemberRob,
First off let me appologize for missing this, sometimes a few questions slip through.As far as the compilation times, I agree given your machine that really is unreasonably long. You should be able to stop validation of the JSP directory by opening it’s properties and marking it as derived. As far as speeding up the normal JSP compilation, the way it works is MyEclipse runs the jspc Ant task from Jasper against your .jsp file, generating a .java file, then it finds and runs the “javac.exe” executable against the .java file reporting any compilation errors (that show up as validation errors in the left margin). So a few things to check:
1) That you don’t have any jasper JARs in your build path of your project, this has been known in 1 case to cause validation to really act weird.
2) That the javac.exe executable in your path is the Sun JDK executable. We have not tested with the JRockit VM at all, but from what I know it’s a VM intended for server apps, so it’s startup costs are quite high as a tradeoff for faster execution. I’m wondering if the javac executable from JRockit takes longer to compile but produces better code? For the purposes of validation in MyEclipse this is likely overkill and just eating up time. You can see the javac executable MyEclispe is using by opening a console window and typing “javac”
matesoMemberI just tried using the Sun javac, and it’s working much faster (about 1 second per jsp). As you said, it must be the startup time of jrockit. It’s still pretty slow to do a whole project (I have 300 JSPs after excluding that one huge directory)…takes about 5 minutes. I have a suggestion to speed this up below.
I would ideally like to still use jrockit as my compiler. Is there a configuration for myeclipse that I can specify the compiler for jsps? Or does it always use the default javac in the path?
As a future feature enhancement, when validating a whole project or directory, it should be smart enough to include all of the JSPs in one jspc task (rather than executing the task once per JSP). When I compile all of my JSPs at once externally using Maven/jrockit/jasper, it’s extremely fast (since the startup time becomes a small factor of the overall time).
Riyad KallaMemberIs there a configuration for myeclipse that I can specify the compiler for jsps? Or does it always use the default javac in the path?
It always uses the default javac right now, at some point we are going to change it back to using the internal JDT compiler that Eclipse uses, unfortunately setting up the compiler to use it for JSPs is not a simple task of just executing a class against a java file, it’s pretty hairy so we’ve postponed making the change in fear that we may introduce some bigger bug if there is no real need.
As a future feature enhancement, when validating a whole project or directory, it should be smart enough to include all of the JSPs in one jspc task (rather than executing the task once per JSP).
This is a good idea, I’ll see what the devs think of it.
-
AuthorPosts