Name: ddT132432 Date: 11/15/2001
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
I am drawing approximately 1000 line segments (using Graphics.drawLine) in a
JPanel. Running under JDK 1.3.1, the draw operation completes in approximately
10 ms. Running under JDK 1.4beta3, the same operation requires approximately 60
ms. I've noticed that vertical/horizontal lines are equally quick to draw in
1.3 and 1.4. The issue is only with non-vertical/horizontal lines.
I have a Celeron 366 with an ATI Rage Pro Turbo. Turning hardware acceleration
completely off in the Windows Display Settings dialog restores the JDK 1.4
performance to equal that of JDK 1.3.
Test case is attached to this bug
Webbugs Test
--------------------
Using 1.3.1 b24
C:\01>c:\jdk1.3.1\bin\java DrawLineTest
plotData took 90 ms
plotData took 90 ms
plotData took 120 ms
plotData took 100 ms
plotData took 20 ms
plotData took 10 ms
plotData took 20 ms
plotData took 10 ms
plotData took 10 ms
plotData took 0 ms
plotData took 10 ms
plotData took 0 ms
Using 1.4beta3 b85
C:\01>c:\jdk1.4\bin\java DrawLineTest
plotData took 60 ms
plotData took 291 ms
plotData took 301 ms
plotData took 290 ms
plotData took 280 ms
plotData took 301 ms
plotData took 290 ms
plotData took 290 ms
plotData took 321 ms
plotData took 360 ms
plotData took 300 ms
Using latest build JDK1.4 b86
plotData took 331 ms
plotData took 280 ms
plotData took 290 ms
plotData took 290 ms
plotData took 311 ms
plotData took 291 ms
plotData took 291 ms
plotData took 291 ms
plotData took 320 ms
plotData took 331 ms
plotData took 291 ms
plotData took 291 ms
(Review ID: 135678)
======================================================================
Note that you can also reproduce the results above by running the test
in jdk1.4 with the -Dsun.java2d.ddoffscreen=false flag on win32 (forcing the
VolatileImage to live in system memory instead of VRAM).
###@###.### 2001-11-20