N
No6
Hi,
I have an application that runs under Java 1.1.8 thru 1.4. All is well except
for the slow performance of the 1.1.8 environments getting an entry from a JAR
file.
It appears that under 118 the call to ZipFile() is taking a lot more time than
under 1.4. I am using no command line argyuments to java when running.
Is this a known issue with 118 ?
Anyone got any ideas on how to speed this up that is workable in Java 118 thru
1.4 ?
Thanks
IAP
----
import java.io.*;
import java.util.*;
import java.net.*;
import java.util.zip.*;
// The JAR classes were not available in 118 (Apple MAC OS 9 limit)
//
//import java.util.jar.*;
public class JarTest
{
public static void main(String[] args) throws IOException
{
String jarFile = "./Forum04.jar";
String fileName = "Forum04/101895.htm";
method1(jarFile, fileName);
} // main
private static void method1(String jar, String file) throws IOException
{
ZipFile zipFile = null;
ZipEntry zipEntry = null;
long start = System.currentTimeMillis();
zipFile = new ZipFile(jar);
long end = System.currentTimeMillis();
System.out.println("IAP M1ZipFile = " + (int)(end - start) + " ms");
start = System.currentTimeMillis();
zipEntry = zipFile.getEntry(file);
end = System.currentTimeMillis();
System.out.println("IAP M1ZipFile.getEntry = " +
(int)(end - start) + " ms");
zipFile.close();
}
}
----
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
IAP M1ZipFile = 6 ms
IAP M1ZipFile.getEntry = 0 ms
java version "1.1.8"
IAP M1ZipFile = 886 ms
IAP M1ZipFile.getEntry = 1 ms
I have an application that runs under Java 1.1.8 thru 1.4. All is well except
for the slow performance of the 1.1.8 environments getting an entry from a JAR
file.
It appears that under 118 the call to ZipFile() is taking a lot more time than
under 1.4. I am using no command line argyuments to java when running.
Is this a known issue with 118 ?
Anyone got any ideas on how to speed this up that is workable in Java 118 thru
1.4 ?
Thanks
IAP
----
import java.io.*;
import java.util.*;
import java.net.*;
import java.util.zip.*;
// The JAR classes were not available in 118 (Apple MAC OS 9 limit)
//
//import java.util.jar.*;
public class JarTest
{
public static void main(String[] args) throws IOException
{
String jarFile = "./Forum04.jar";
String fileName = "Forum04/101895.htm";
method1(jarFile, fileName);
} // main
private static void method1(String jar, String file) throws IOException
{
ZipFile zipFile = null;
ZipEntry zipEntry = null;
long start = System.currentTimeMillis();
zipFile = new ZipFile(jar);
long end = System.currentTimeMillis();
System.out.println("IAP M1ZipFile = " + (int)(end - start) + " ms");
start = System.currentTimeMillis();
zipEntry = zipFile.getEntry(file);
end = System.currentTimeMillis();
System.out.println("IAP M1ZipFile.getEntry = " +
(int)(end - start) + " ms");
zipFile.close();
}
}
----
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
IAP M1ZipFile = 6 ms
IAP M1ZipFile.getEntry = 0 ms
java version "1.1.8"
IAP M1ZipFile = 886 ms
IAP M1ZipFile.getEntry = 1 ms