Process-level fork on OpenJDK...is it madness?
forax at univ-mlv.fr
Wed Nov 30 05:02:16 PST 2011
On 11/30/2011 12:10 AM, Jochen Theodorou wrote:
> Am 29.11.2011 23:34, schrieb Thomas Wuerthinger:
>> On 11/29/11 11:22 PM, Jochen Theodorou wrote:
>>> Am 29.11.2011 22:32, schrieb Mark Roos:
>>>> I just finished a paper (link below) on JVM startup time which states
>>>> that for small programs its around
>>>> 70ms. So I assume there is some other startup time you are trying to
>>>> improve? Or is the
>>>> paper not applicable to the launching of a new process as you describe it?
>>> For the JVM itself that might be true, but in case of for example Groovy
>>> there is a lot if init work to be done before the first program can be
>>> executed. And this takes time.
>>> bye Jochen
>> What kind of initialization work is this? Could the result of that work
>> be cached?
> we have to setup the initial meta class system, which requires to use
> reflection to inspect some classes and other work. Yes, this could be
> cached, if we would know how.
It worth to give a try to java.lang.ClassValue, here.
You you be able to create your metaclass only when needed.
Also note that you can also lazyly initialize the list of methods,
fields etc. because even if two threads ask the same list at the
same time, the result will be the same, so there is no need
to use synchronized here.
(this is exactly what java.lang.Class code does) :
> bye Jochen
More information about the mlvm-dev