|
From: <bc...@wo...> - 2002-01-09 13:16:08
|
[James Northrup]
>I've ported a jython app from wintel to a STRONGARM j2se1.3.1 classic vm.
>(200mhz integer-only 32mb no jit or hotspot)
>
>the package cache loading takes 15 minutes by the time it gets done with
>jython.jar, i18.jar and rt.jar
>
>briefly, what does the package cache speed up and how is this implemented?
It improves the startup time of the interpreter for subsequent startups.
The packagemanager needs to know that "java" and "java.lang" are java
packages to support statement like:
import java.util
and it need to know which java classes are located in each package to
support statements like:
from java.lang import *
For each .jar file it creates a cachedir\packages\jarfile.pkc which is
serialized mapping with the contents of:
{
'java.lang' : 'Boolean,Byte,Character,CharSequence,...'.
'java.util' : 'AbstractCollection,AbstractList,AbstractMap,....',
'packagename' : 'public-class-list@non-public-class-list',
}
The cachedir\packages\packages.idx file maps the full path of the .jar
file to its corresponding .pkc file and it maintain a modification date
so it knows when it is necessary to re-scan the .jar file.
regards,
finn
|