← Back to team overview

openjdk team mailing list archive

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

 

Package: openjdk-7-jre
Version: 7~b147-2.0-1
Severity: minor

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.
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)

A patch is available here:
http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20111021/0377d133/XComponentPeer.patch

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages openjdk-7-jre depends on:
ii  libaccess-bridge-java-jni  1.26.2-8
ii  libasound2                 1.0.24.1-4
ii  libatk1.0-0                2.2.0-2
ii  libc6                      2.13-21
ii  libcairo2                  1.10.2-6.1
ii  libcups2                   1.5.0-13
ii  libfontconfig1             2.8.0-3
ii  libfreetype6               2.4.8-1
ii  libgdk-pixbuf2.0-0         2.24.0-1
ii  libgif4                    4.1.6-9
ii  libglib2.0-0               2.30.2-4
ii  libgtk2.0-0                2.24.8-2
ii  libjpeg8                   8c-2
ii  libpango1.0-0              1.29.4-2
ii  libpng12-0                 1.2.46-3
ii  libpulse0                  1.1-2
ii  libx11-6                   2:1.4.4-4
ii  libxext6                   2:1.3.0-3
ii  libxi6                     2:1.4.3-3
ii  libxrender1                1:0.9.6-2
ii  libxtst6                   2:1.2.0-4
ii  openjdk-7-jre-headless     7~b147-2.0-1
ii  zlib1g                     1:1.2.3.4.dfsg-3

Versions of packages openjdk-7-jre recommends:
ii  ttf-dejavu-extra  2.33-2

Versions of packages openjdk-7-jre suggests:
ii  icedtea-plugin [icedtea6-plugin]  1.1.4-1

-- no debconf information





Follow ups