Hi Simo,

  we scan a set of packages that can be specified programmatically, as done
by Jersey for example to detect providers.
There are several optimizations that can be done like building a local
cache to avoid a full rescan every time (for example while
running CLI tools).  ATM the best choice is to use the more strictest
packages as possible.

I would like to spend some time optimizing the PluginManager, implementing
for example a local cache based on, classpath
files modifications. I think we could arrive to a general purpose lib
for classpath scanning in Java (that ATM is missing AFAIK).

Let me know when you're available for a deeper discussion about it.

The best.

Mic

On 16 February 2012 23:24, Lewis John Mcgibbney
<[email protected]>wrote:

> I'm here Simo, but of little help.. I'm nearly burnt out for the day....
>
> If we can initiate a discussion it is better than nothing at all I suppose.
>
>
> On Thu, Feb 16, 2012 at 10:21 PM, Simone Tripodi
> <[email protected]>wrote:
>
> > Hi all,
> >
> > I started having a look at the current plugins architecture and just
> > noticed we scan the classpath: that is the most expensive operation,
> > because no optimization can be applied and it is always linear - that
> > also means that more jars plugin we add, the more is memory/time
> > consumption.
> >
> > There is an improvement we can apply switching over the ServiceLoader
> > pattern, I need anyway more details about the plugins architecture...
> > anyone available?
> >
> > TIA,
> > -Simo
> >
> > http://people.apache.org/~simonetripodi/
> > http://simonetripodi.livejournal.com/
> > http://twitter.com/simonetripodi
> > http://www.99soft.org/
> >
>
>
>
> --
> *Lewis*
>



-- 
Michele Mostarda
Senior Software Engineer
skype: michele.mostarda
twitter: micmos
mail: [email protected]
site : http://www.michelemostarda.com

Reply via email to