8010309 : PlatformLogger: isLoggable performance / waste due to HashMap<Integer, Level> leads to Integer allocations (boxing)
Holger Hoffstaette
holger.hoffstaette at googlemail.com
Thu Mar 21 14:17:53 UTC 2013
On Thu, 21 Mar 2013 13:39:19 +0000, David M. Lloyd wrote:
> On 3/21/13 12:04 PM, Holger Hoffstaette wrote:
>> On Thu, 21 Mar 2013 12:12:07 +0100, Laurent Bourgès wrote:
>>
>> [..]
>>> FYI, I removed completely the Map<Integer, Object> levelObjects and
>>> used two arrays to perform the PlatformLogger's level (int) to
>>> j.u.l.Level mapping:
>> [..]
>>
>> FWIW I know of at least one (quite old) project that declares custom
>> j.u.l. Levels and which would be broken by this change. I personally
>> don't care (since I think both j.u.l. and custom log levels are wrong to
>> begin with :), but it's something to keep in mind. Maybe a Map-based
>> mapping could be used as fallback, while the array-indexed lookups take
>> the heat off of the common case. Just a suggestion.
>
> Why would the platform logger ever use custom levels though?
<shuffles feet>
Absolutely right - "very likely" it would not. "Good point!" :)
-h
More information about the core-libs-dev
mailing list