Loading classes with many methods is very expensive

Peter Levart peter.levart at gmail.com
Thu Oct 30 09:48:30 UTC 2014

Sorry, I apologize. I'll start a new thread on core-libs only.


On 10/30/2014 10:47 AM, Aleksey Shipilev wrote:
> Guys, can you please start a new RFR thread for Peter's change? You have
> a bug ID now, and the discussion should be searchable by bug ID.
> Also, you are spamming two aliases (corelibs + hotspot-runtime) instead
> of one ;)
> -Aleksey.
> On 10/30/2014 12:43 PM, Peter Levart wrote:
>> On 10/30/2014 10:29 AM, Peter Levart wrote:
>>> I might get away with excluding seq from hashCode computation and only
>>> use it in equals(). This way Key(s) could be modified in-place
>>> (hashCode would not change, entry would stay in same bucket), it would
>>> just become equal to some other Key. Modification operations would
>>> keep the invariant that there are no duplicate Key(s) at any time in
>>> the Map. All entries sharing same method signature would end-up in the
>>> same bucket (and maybe share it with entries that just happen to have
>>> the same hashCode mod capacity) and we would get a similar linked list
>>> of entries as with previous approach - only without another level of
>>> indirection...
>> That would not work. I would have to have the Key object accessible.
>> Since Map does not have a getKey(key) operation, I would have to store
>> the Key as a value too. And we're back to MethodList approach...
>> Peter

More information about the core-libs-dev mailing list