-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0, 1.4.1_02
-
None
-
x86
-
windows_2000
filed under appletviewer but also seen in the plugin on IE5.
Example code: (See attached file: BurnCpuApplet.jar) The class file is
compiled using 1.4.1_02, will not run on 1.3.x (you must recompile the
source).
Installation Instructions: To run the applet example locally, configure
your IDE to use 1.4.1_02 plugin and run the applet within the AppletViewer.
To run the example within IE, install (See attached
file: BurnCpuApplet.jsp)and the above jar file in the same directory within
a servlet engine.
To run as a standalone app, just launch with java -cp
BurnCpuApplet.jar sun.java.bug.BurnCpuApplet
Dependencies: rt.jar
to run it with appletviewer
java -cp BurnCpuApplet.jar sun.applet.AppletViewer BurnCpuApplet.html
the html file is attached and only contains the line
<applet code="sun.java.bug.BurnCpuApplet.class" width=584 height=200> </applet>
Problem demonstration: Click on Choice box and select 'blue panel'. Text
'blue panel takes flip#1' will show immediately. Then select 'red panel'.
The text 'red panel takes flip#2' will show after approx. 5 seconds.
During this period CPU utilization goes to 100%. This will happen with all
subsequent Choice selection.
Observations:
Problem can be reproduced by running 1.4.1_02 AppletViewer or Java
plugin within IE5.x
The applet runs fine on 1.3.1._08
The applet runs fine within IE6.x on either 1.3 or 1.4
The standalone version runs fine on either 1.3 or 1.4
Thread profiling showed that AWT-Windows thread spends almost 100% CPU
within native method WToolkit.eventLoop(). This considerably slows
performance of the entire system, including other JVM threads.
The source level debugging showed that this burst of CPU activity inside
native event loop (AWT-Windows) happens between two native calls in
WComponentPeer(): WCanvasPeer.create(WComponentPeer wc) and
WComponentPeer.start() in AWT-EventQueue-1 thread (see below).
WComponentPeer(Component component)
{
isLayouting = false;
paintPending = false;
oldWidth = -1;
oldHeight = -1;
numBackBuffers = 0;
backBuffer = null;
serialNum = 0;
target = component;
paintArea = new RepaintArea();
Container container = WToolkit.getNativeContainer(component);
WComponentPeer wcomponentpeer
= (WComponentPeer)WToolkit.targetToPeer(container);
create(wcomponentpeer);
surfaceData = Win32SurfaceData.createData(this, numBackBuffers);
initialize();
start();
}
Example code: (See attached file: BurnCpuApplet.jar) The class file is
compiled using 1.4.1_02, will not run on 1.3.x (you must recompile the
source).
Installation Instructions: To run the applet example locally, configure
your IDE to use 1.4.1_02 plugin and run the applet within the AppletViewer.
To run the example within IE, install (See attached
file: BurnCpuApplet.jsp)and the above jar file in the same directory within
a servlet engine.
To run as a standalone app, just launch with java -cp
BurnCpuApplet.jar sun.java.bug.BurnCpuApplet
Dependencies: rt.jar
to run it with appletviewer
java -cp BurnCpuApplet.jar sun.applet.AppletViewer BurnCpuApplet.html
the html file is attached and only contains the line
<applet code="sun.java.bug.BurnCpuApplet.class" width=584 height=200> </applet>
Problem demonstration: Click on Choice box and select 'blue panel'. Text
'blue panel takes flip#1' will show immediately. Then select 'red panel'.
The text 'red panel takes flip#2' will show after approx. 5 seconds.
During this period CPU utilization goes to 100%. This will happen with all
subsequent Choice selection.
Observations:
Problem can be reproduced by running 1.4.1_02 AppletViewer or Java
plugin within IE5.x
The applet runs fine on 1.3.1._08
The applet runs fine within IE6.x on either 1.3 or 1.4
The standalone version runs fine on either 1.3 or 1.4
Thread profiling showed that AWT-Windows thread spends almost 100% CPU
within native method WToolkit.eventLoop(). This considerably slows
performance of the entire system, including other JVM threads.
The source level debugging showed that this burst of CPU activity inside
native event loop (AWT-Windows) happens between two native calls in
WComponentPeer(): WCanvasPeer.create(WComponentPeer wc) and
WComponentPeer.start() in AWT-EventQueue-1 thread (see below).
WComponentPeer(Component component)
{
isLayouting = false;
paintPending = false;
oldWidth = -1;
oldHeight = -1;
numBackBuffers = 0;
backBuffer = null;
serialNum = 0;
target = component;
paintArea = new RepaintArea();
Container container = WToolkit.getNativeContainer(component);
WComponentPeer wcomponentpeer
= (WComponentPeer)WToolkit.targetToPeer(container);
create(wcomponentpeer);
surfaceData = Win32SurfaceData.createData(this, numBackBuffers);
initialize();
start();
}
- duplicates
-
JDK-4745222 1.4 REGRESSION: java.awt.Container.add is very slow in Applets
-
- Closed
-
- relates to
-
JDK-4673954 Applets consume 100% CPU usage by using 1.4 plugin
-
- Closed
-