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

Using Japanese IME in text area causes performance issue with JDK 8u161

    Details

      Description

      FULL PRODUCT VERSION :
      D:\Java\jdk1.8.0_161\bin>java -version
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 64 bit.

      A DESCRIPTION OF THE PROBLEM :
      Please test to use the flowing code:
      /*********************************************************/
      package com.test.ime;

      import java.awt.Container;

      import javax.swing.JFrame;
      import javax.swing.JTextArea;
      import javax.swing.WindowConstants;

      public class ImeExample extends JFrame {
      /**
      * Launch the application.
      */
      public static void main(String[] args) {
      new ImeExample().createFrame();
      }

      /**
      * Create the frame.
      */
      public void createFrame() {
      JFrame frame =new JFrame("just for tesing ...");
      Container container = frame.getContentPane();
      JTextArea txtrTest = new JTextArea();
      txtrTest.setText("test");
      container.add(txtrTest);
      frame.setVisible(true);
      frame.setSize(400, 300);
      frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
      }
      }
       /*********************************************************/



      REGRESSION. Last worked in version 8u152

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run this example in jdk 1.8_161 version, you will see the a java window which is included a text area component.
      2.Switch the input method to the Japannese IME,and select the input mode to "Hiragana".
      3.Come back to the text area, press the 'a' key, the 'あ' will be shown in the text area.
      4.Open the task manager, check the CPU loading, in my computer, the cpu load will keep to 13%.
      5.Run the same code in the jdk 1.8_152, run step 2,3,4, check the cpu loading, in my computer, the cpu load keep to 0%.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Hope the cpu load keep 0%.
      ACTUAL -
      the cpu load keep to 13%.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*********************************************************/
      package com.test.ime;

      import java.awt.Container;

      import javax.swing.JFrame;
      import javax.swing.JTextArea;
      import javax.swing.WindowConstants;

      public class ImeExample extends JFrame {
      /**
      * Launch the application.
      */
      public static void main(String[] args) {
      new ImeExample().createFrame();
      }

      /**
      * Create the frame.
      */
      public void createFrame() {
      JFrame frame =new JFrame("just for tesing ...");
      Container container = frame.getContentPane();
      JTextArea txtrTest = new JTextArea();
      txtrTest.setText("test");
      container.add(txtrTest);
      frame.setVisible(true);
      frame.setSize(400, 300);
      frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
      }
      }
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aivanov Alexey Ivanov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: