Bug 798 : Programs run with release 0136+ are sometimes slower due to Java 1.5
Last modified: 2008-06-07 09:24



Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2008-06-02 16:58
Win Vista w/SP1
AMD X2 6000+
4GB ddr2 800 Ram
Nvidia 8800GT 512MB

Running the exact same code in 0135 and 0138.

When run in 0135 I get a framerate of ~62
When run in 0138 I get a framerate of ~39

Running the code in 0138 does produce a smoother animation to the eye
though, so not quite sure if it is a bug or a fix, or even both. I didn't
see anything in the release notes about it so thought it best to check.


float z = 0.0;

void setup()
size(192, 192, P3D);

void draw()
for (int x = 0; x <= height; x++)
for (int y = 0; y <= width; y++)
set(x, y, color(noise(x * 0.1, y * 0.1, z) * 255));
z = z + 0.005;

Additional Comment #1 From kraelen 2008-06-02 17:05
Thought I would double check to make sure it wasn't me being stupid again.
I changed the code to set to random(255) instead of noise and both versions
then ran at a smooth 62fps. Definitely Perlin noise related.
Additional Comment #2 From fry 2008-06-02 17:46
Have you tried on a non-AMD windows machine? The issue is differences in
Java 1.4 and Java 1.5 performance (Perlin noise hasn't changed between
these releases) on your machine. However I'm not seeing the same slowdown
on an Intel Mac, for instance. I wonder if they removed some AMD-specific
optimizations in 1.5 or something like that.
Additional Comment #3 From kraelen 2008-06-04 10:02
Finally got hold of a Intel based laptop today.

Windows XP w/SP2
Intel pentium 4 (3.2Ghz)
2GB ram
ATi Mobility Radeon X600 (128MB)

Both 0135 and 0138 ran at ~38 fps.

Not sure if the OS would have anything to do with it as well. Unfortunately
I can't get access to an AMD w/XP machine or an Intel w/Vista machine. I
tried various searches on google and found various reports of 1.5 being
slower than 1.3 and 1.4 for some people but nothing conclusive. Some of the
reports also involved a few Intel based systems.

There doesn't seem to be a solution. It isn't a bug in processing at least.
Additional Comment #4 From fry 2008-06-07 09:24
right, it's just one of these moving target things with the java stuff.
when java 1.6 update 10 is finalized, we'll standardize on that for windows
and linux, and that should be speedier in general, hopefully getting rid of
some of these quirks.