Defining a minimal boot module
Mark Reinhold
mr at sun.com
Fri Oct 23 12:55:05 PDT 2009
(Moving this thread to the open list)
> Date: Fri, 23 Oct 2009 12:35:56 -0700
> From: mandy.chung at sun.com
> Mark Reinhold wrote:
>>> Date: Fri, 23 Oct 2009 11:44:42 -0700
>>> From: mandy.chung at sun.com
>>>
>>> ...
>>>
>>> One other note:
>>> java.util.Collections + its 48 inner classes take 114091 bytes
>>>
>>> I am not suggesting to remove java.util.Collections from the boot module but
>>> just as a reference. Individual class is small but they add up.
>>
>> How many collections classes are actually used during boot?
>> I'd guess a lot less than 48.
>
> 8 classes:
>
> java.util.Collections
> java.util.Collections$EmptyList
> java.util.Collections$EmptyMap
> java.util.Collections$EmptySet
> java.util.Collections$SetFromMap
> java.util.Collections$SynchronizedCollection
> java.util.Collections$SynchronizedMap
> java.util.Collections$SynchronizedSet
>
> It used to be fewer (3-4) before the parallel class loader change. I am
> looking into avoiding initializing the parallelLoaders static variable.
>
> Excluding java.util.Collections from the boot module seems a good idea to me at
> first but I was concerned that is too strict restriction for future
> development. Is it reasonable not to allow to use Collections during boot? I
> guess so.
Your list looks far too short to me. It should at least include HashMap
and HashSet, which I know are used in the Jigsaw runtime and also in some
key java.lang classes.
- Mark
More information about the jigsaw-dev
mailing list