← Back to team overview

openjdk team mailing list archive

Bug#651423: Bug#651423: openjdk-7-jre: X11 support in Java wastes CPU for (disabled) logging

 

tag 651423 + upstream
forwarded 651423 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7104625
thanks

Le jeudi 08 décembre 2011 15:11:04, Erich Schubert a écrit :
> Package: openjdk-7-jre
> Version: 7~b147-2.0-1
> Severity: minor

Hi Erich,

> Please consider adding this fix in OpenJDK7:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7104625
> which seems to be scheduled for OpenJDK8 (8b14) only so far.

This patch has been merged into JDK8 mercurial repository :
http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/7636a62aba7e

> As far as I can tell this would reduce the memory impact of X11 in Java
> remarkably by avoiding unnecessary string operations. The fix is to add
> simple if statements whether logging is desired or not. There is little
> risk of introducing a new bug with such a change:
> 
> if(enableLog.isLoggable(PlatformLogger.FINEST) {
>   // existing code
> }
> 
> However, it saves serializing all X11 resources to a string representation
> by a hidden call to XEvent.toString (which invokes
> XEvent.getFieldsAsString)

Yes: it seems an interesting fix.

Cheers,
-- 
Damien - Debian Developper
http://wiki.debian.org/DamienRaudeMorvan

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References