classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cp-patches] Patch: support for reading directories viaURL.openConne


From: Jeroen Frijters
Subject: RE: [cp-patches] Patch: support for reading directories viaURL.openConnection()
Date: Thu, 9 Sep 2004 18:37:51 +0200

Archie Cobbs wrote:
> Jeroen Frijters wrote:
> > Static initializers are quite expensive, so we should try to limit
> > them as much as reasonable.
> 
> I'm curious about what you mean exactly by this statement..

When a class (or its base class) has a static initializer, all static
members accesses and instantiations (done from outside the class itself)
from methods that are JIT compiled before the static initializer is run,
have to be wrapped in a check to see if the static initializer needs to
run and this check needs to be done in a thread safe fashion. Details
obviously very for each VM, but in general a static initializer adds a
cost and very often it is not a one time cost.

Regards,
Jeroen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]