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 12:04:38 UTC 2013
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.
cheers
Holger
More information about the core-libs-dev
mailing list