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

Application uses higher CPU in 8u161/8u162

XMLWordPrintable

    • x86
    • other

      FULL PRODUCT VERSION :
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.15063]

      A DESCRIPTION OF THE PROBLEM :
      Swing applications uses a lot of CPU after upgrading to 8u161/8u162

      REGRESSION. Last worked in version 8u152

      ADDITIONAL REGRESSION INFORMATION:
      Broken in 8u161/8u162
      OK in 8u151/8u152
      OK in 9.0.4

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run application
      Click in JTextField
      Click in another application (like Outlook, Chrome or other)
      Click in JTextField.
      After a few tries, CPU spikes

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No CPU usage after switching between applications
      ACTUAL -
      17% cpu load on an 8 core machine
      29% cpu load on an 4 core machine

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Test1{
      public static void main(String... args) {
      JFrame f = new JFrame("Test");
      JTabbedPane tp = new JTabbedPane();
      tp.addTab("tab 1", new JTextField(20));
      f.add(tp);
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.pack();
      f.setLocationRelativeTo(null);
      f.setVisible(true);
      }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Clicking the tab in the JTabbedPane seems to stop CPU usage.
      I have found no other workarounds.

      SUPPORT :
      YES

            bvaidya Balchandra Vaidya
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: