JDK-8197816 : Using Japanese IME in text area causes performance issue with JDK 8u161
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u161
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2018-02-06
  • Updated: 2018-04-10
  • Resolved: 2018-02-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8-poolResolved
Related Reports
Duplicate :  
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 ----------


Comments
removing BPR label as this bug duplicates : JDK-8183504 and this is shipped in 8u162-b36
15-03-2018

It's a duplicate of JDK-8183504.
18-02-2018

Reported with: JDK 8u161 Windows 7 Using Japanese IME suddenly raise the CPU usage. Checked this in Windows 10 version 1709 (64-bit) VM for JDK 8u161, 9.0.4 and 10 ea b42 and could confirm the issue as reported. Results: ========== 8u152 b16: OK 8u161: Fail 8u162: Fail 8u172 ea b01 and b03: OK 9.0.4: OK 10 ea b42: OK The issue seems to be restricted to JDK 8u161 and 8u162. To verify, run the attached test case with respective JDK versions. Need to switch to Japanese - Hiragana input method post run in order to enter the text.
13-02-2018