JDK-2121398 : classes are loaded 512 bytes at a time, slowing down applet start time
  • Type: Backport
  • Backport of: JDK-4974531
  • Component: deploy
  • Sub-Component: plugin
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2004-11-15
  • Updated: 2010-04-04
  • Resolved: 2004-11-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_08Fixed 6 b14Fixed
Comments
SUGGESTED FIX ------- ZipFile.java ------- *** /tmp/sccs._maONu Mon Nov 15 12:40:22 2004 --- ZipFile.java Fri Oct 22 14:22:24 2004 *************** *** 207,213 **** case STORED: return zfin; case DEFLATED: ! return new InflaterInputStream(zfin, getInflater()) { private boolean isClosed = false; public void close() throws IOException { --- 207,216 ---- case STORED: return zfin; case DEFLATED: ! int size = getSize(jzentry); ! if (size > 65536) size =8192; ! if (size <= 0) size = 4096; ! return new InflaterInputStream(zfin, getInflater(), size) { private boolean isClosed = false; public void close() throws IOException { ###@###.### 2004-11-15 20:41:16 GMT
15-11-2004

EVALUATION A fix is to check the zip file entry size and uses it as the buffer size when constructing an InflaterInputStream. Note that the check for the entry size is needed because sometimes the size could be negative. With the fix, the number of reads from SwingSet2.jar (using the SwingSet2 applet as the test case) is reduced from approx. 7900 to 3400. ###@###.### 2004-11-15 20:41:16 GMT
15-11-2004