JBoss Community

Lazy modules resolving / linking

created by Ales Justin in JBoss AS7 Development - View the full discussion

A simple brain dump about lazy module resolution -- as I'm yet to fully understand the code.

 

Lets say you could immediately map resource to owning module.

e.g. based on the package ->  org.jboss.foo is the module name, my class is org.jboss.foo.bar.Baz

Or any similar mechanism would do.

 

We could then lazy load the first level / near module dependencies,

only fully initialize it on demand -- when first resource lookup is hit,

and again have its first level / near dependencies lazy.

 

This could be done optional, by default, as we currently do, resolve the whole graph at start.

Perhaps pushing it a bit :-), we could even specify the depth / level of resolving.

 

A few observations:

* OSGi has this similar notion of lazy resolve - how do we do it now?

* if I'm not mistaken, and I think Flavia was thinking about the same issue, we can reduce visiting

  --> simply (recursively) reuse paths from own children, no need to visit them

 

Wdyt? Or, how much work this would be?

I can try to hack something, but any input is appreciated.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community