JDK-4717079 : Sybase Java Application startup time is SLOW in JDK 1.4 compared to JDK 1.3.1_02
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2002-07-18
  • Updated: 2002-11-11
  • Resolved: 2002-11-11
Related Reports
Relates :  
Relates :  
Description
This is a continuation of bug # 4653558/4690509
addressing Swing issues found by Fred Oliver
See comments for further info, see attachments to
bug# 4653558 fro test case.

Sybase Java Application startup time is SLOW in JDK 1.4 compared to JDK 1.3.1_02

Customer Problem Description:
----------------------------

----
We have noticed here that jdk 1.4 starts our applications slower than
Jdk 1.3.1 did.  In fact we have found it to be about 50% worse.  I
thought I had heard that startup time was improved with JRE 1.4.

I have attached a log file that shows my results for one application.  I
compared different java compilers, jar indexing, and the 1.3.1_02 and 1.4
VMs.

Are these the results I should be expecting when comparing 1.3.1_02 with
1.4?

I have attached a sample application which shows this behavior

Unzip it into a directory.  PerfTest2 is the batch file
that runs everything.  You will have to change:
 set jdk=1.3.1_02 to match your machine.

PerfRun.bat assumes that your jre's are installed with the naming pattern
c:\jdk followed by the setting for jdk in PerfTest2.bat.

Note: I run the test once and throw the results away.  Then I run it again
- that way everything should be in memory.

In our case jdk_1.3.1_02_13.log is the same as jdk_1.3.1_02_13c.log
as we only run with Sun's javac compiler.


(See attached file: perfTest2.log)

Note: We haven't tested this application on Sparc platforms. But, if the
performance problem does show up on Sparc, please fix it as we have
customers using our application on Sun's UltraSparc servers.
-----

Comments
EVALUATION I tried 1.4.1 with swing 1.3.1 and 1.4.1, here are the results, using a 1.6Ghz 2000 box: java -Xbootclasspath:path-to-explored-jre;jre/lib/i18nn.jar ... where path-exploded jar was created via jar vxf rt.jar into a directory and java -Xbootclasspath:path-to-explored-jre-w-swing-131;jre/lib/i18nn.jar ... and path-to-exploded-jre-w-swing was created via jar vxf 1.4.1/rt.jar jar vxf 1.3.1/rt.jar javax/swing com/sun/java/swing Here are the results: 1.4.1: Total time: min: 2.0 max: 2.2 average: 2.1000001 Total CPU: min: 2.0 max: 2.1 average: 2.0700002 Total kernel: min: 0.5 max: 0.6 average: 0.54 Total user: min: 1.4 max: 1.6 average: 1.5300001 1.4.1 with swing 1.3.1 Total time: min: 1.9 max: 2.1 average: 2.0 Total CPU: min: 1.8 max: 2.1 average: 1.9399999 Total kernel: min: 0.4 max: 0.6 average: 0.51 Total user: min: 1.3 max: 1.6 average: 1.43 Hmm... Lots of numbers and I am not sure which is a fair measure here. I would wager roughly 5% slow down. I did a quick test and came to the conclusion that picking up the desktop properties (colors, fonts, sounds ...) accounts for half of the slow down. This has always been earmarked as a slow down (in AWT) but they decided there wasn't anything they could do about it. There are also ~70 additional classes that get pulled in with Swing's 1.4.1: DnD support, focus rewrite, volatile image, instanceof checks, JFileChooser rewrite to pick up resources from the platform... Not sure if there is anything we can do about the additional classes at this point. As far as the slow down between 1.3.1 and 1.4, a handful of things have gotten slower across the board affecting startup: more classes, loading properties files, reflection (which has been addressed in 1.4.1 and 1.4.2)... ###@###.### 2002-07-18; Closing this out as 1.4.2b6 is now ~12% faster than 1.3.1. This is due to the changes done by Ken and team. ###@###.### 2002-11-11
18-07-2002