Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] ContextFinder stops at first bundle class loader

equinox-dev-bounces@xxxxxxxxxxx wrote on 11/26/2007 10:52:30 AM:
> How do buddy classloading and DynamicImport-Package compare with
> regards to performance ?
> I've had very bad experiences performance-wise with buddy classloading
> and a global policy...

There is an existing bug about buddy classloading performance

https://bugs.eclipse.org/bugs/show_bug.cgi?id=152006

This bug is about performance where there are a large number
of bundles for the "registered" buddy policy.  

The "global" buddy policy can be expensive because we must
search the "global" set of packages for the package where the requested
class is from.  We could optimize this to be faster but I really hope
the "global" policy is rarely used.  If you have a strong usecase
for using the "global" policy and are seeing bad performance then
please open a bug report so we can consider improving it.

DynamicImport-Package does have a performance hit also, but it is only
a one time hit when trying to establish a wire.  Once the wire is
established we no longer have to try and resolve the import on the
next class request from the same package.  This is one of the
differences between dynamic import and buddy classloading.  
Dynamic imports are statically bound a package wire once they are

established.  In buddy loading a wire is not kept, the search for
a buddy is done each class/resource load.

Tom.


Back to the top