We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Mac performance tweaks
Page Index Toggle Pages: 1
Mac performance tweaks (Read 1028 times)
Mac performance tweaks
Oct 24th, 2005, 6:03pm
 
I programmed my sketch on someone elses pc and now I've finally got back to my mac and it runs extremely slow, although the pc was pretty high end and my macs pretty old now it still runs most sketches on the site really well so I'm wondering if its to do with Java2D because when I change the renderer to P3D it runs extremely fast but doesnt work correctly (its a simple particle system in a way the does lots of get and set pixel and uses fat strokes too so doesnt look right in this) it works ok with about 5 particles but anything higher slows down.

Any suggestions?
Re: Mac performance tweaks
Reply #1 - Oct 24th, 2005, 8:26pm
 
If it's doing pixel based stuff, java2d is probably to blame. I've found accessing the pixels in java2d is super slow. (i'm on mac) Are you using the pixel array directly? Maybe try that if you are still using get() and set(). It might be faster..
Re: Mac performance tweaks
Reply #2 - Oct 25th, 2005, 1:11am
 
Yeah its all get and set Smiley I'll try switching it to the array then writing that as a whole but unless that would be massively faster then no point really cos we're talking about 1/2 fps here. Bit of a shame must have been a very fast pc I was using.

Hopefully the new 2D system will solve this, been trying to make this program for years now Smiley
Re: Mac performance tweaks
Reply #3 - Oct 25th, 2005, 3:28pm
 
get/set are really slow. see the last paragraph of the get reference:
http://processing.org/reference/get_.html

use P3D, loadPixels, and the pixels[] array directly and you'll see a significant increase in speed.

added:
macs are also exceptionally and annoyingly slow at running java. this is partly because they're just slower (mhz not meaning anything is a myth in itself.. see all the shocked comments about how fast the intel dev boxes run osx) and apple's java vm also seems to be quite pokey. difference between my 3ghz pc and 1.5ghz mac is sometimes 30 fps vs. 10 fps.
Re: Mac performance tweaks
Reply #4 - Oct 25th, 2005, 11:33pm
 
actually tried it on a reasonably powerful pc today and it was still pretty slow, nowhere near the speed I developed it on (although that was like a 3D work station level machine which may explain it Cheesy)
I'll try tweaking it as you suggested seen as it runs lightening fast in p3d on my pretty old mac as it is.
Page Index Toggle Pages: 1