Review request: exports runtime support + jdk modules converted to use exports

Mandy Chung mandy.chung at oracle.com
Fri Jun 10 12:09:47 PDT 2011


  On 6/10/11 11:23 AM, David M. Lloyd wrote:
> Keeping (additional) maps of every class seems ludicrous to me.  In 
> JBoss Modules, we do everything by package, with additional filters 
> which can be (optionally) applied for the non-common case where you 
> want to only partially export a package.  It is far more 
> memory-efficient, and empirically seems to be very fast.
>
> Note that it is important not to over-promise the contract.  If you 
> tell people that they can and should routinely pick and choose classes 
> within a package to export or not export, you're encouraging a usage 
> pattern that may not be easy to implement efficiently.
>
> By encouraging users to export whole packages only, but give the 
> option of partial package export (at a possible performance cost) you 
> are encouraging much more performant behaviors without reducing your 
> total functionality.

Agree and this is also what I am considering for optimization.  
Exporting whole packages is the common case in which we would only need 
to keep maps of package names and handle individual class exports 
differently.

Mandy



More information about the jigsaw-dev mailing list