views:

57

answers:

1

I'm working on a visualisation app with Processing.

All appears to be going well, but I've noticed that in the console, I'm seeing any println() statements from the setup() method in triplicate. This doesn't appear to be the case for similar statements inside the draw() loop.

I thought this might just be an output thing, but I'm now seeing multiple attempts to open files. It will likely be taking its toll on performance, too.

Any idea how I can prevent this?

I'm using Processing 1.0.9 on Mac OS 10.6.3.

Thanks in advance, Ross

+4  A: 

Calls to size() and/or hint() cause setup() to be run again. Put those calls first to prevent other code (e.g. file loading) being affected.

rossmcf