Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357174

sun.awt.UNIXToolkit#getGnomeShellMajorVersion possible performance improvement

XMLWordPrintable

      https://github.com/openjdk/jdk/blob/3dd34517000e4ce1a21619922c62c025f98aad44/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java#L257-L285

      getGnomeShellMajorVersion currently calling `/usr/bin/gnome-shell --version` to check the Gnome Shell version.

      On my system it tooks about 33ms

      We need to investigate whether it is faster to retrieve this version using the D-Bus API


      It is definitely available through introspection:
      gdbus introspect --session --dest org.gnome.Shell --object-path /org/gnome/Shell | grep ShellVersion

      or https://unix.stackexchange.com/questions/73212/how-to-get-the-gnome-version/73225#73225

            azvegint Alexander Zvegintsev
            azvegint Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: