JDK1.5 Javac performance degredation (from jasper)
We have just moved from JDK1.4.2_10 to JDK1.5.0_06 and we are experiencing problems with jsp compilation under tomcat.
The jasper compiler with the new JDK takes5 times the original time which really problematic.
I have profiled the behavior of the compilation process.
The flow as I understand it: jasper calls ant javac task which calls javac API in the same process (no fork).
Most of the time is spent injava.util.ZipFile$3.nextElement() and init()methods.
The class path of invocations in both versions is very similar (and long)
Any idea?
[625 byte] By [
haimya] at [2007-10-3 2:18:14]

Thank you all for your help but I found the problem
It is a bug in the JDK which is not fix in any 1.5 of 1.6 revisions
AFAIK it is not reported as a bug yet.
The problem is a combination of a JDK bug and a malformed jar that we have in our product.
For every jar in the class-path the compiler scans the manifest file and includes all the jars described there as well.
Unfortunately we have a jar named ri_generic.jar which its classpath includes ./ri_generic.jar
This puts the compiler into a loop which makes the class-path much longer (fortunately this is not an infinite loop)
The path created includes
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\.\.\ri_generic.jar
[javac] ***P:\BAC\BAC6.2_SP\Latest\dist\win32\Release\core\lib\.\.\.\.\.\.\.\ri_generic.jar
etc....
haimya at 2007-7-14 19:17:07 >
