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 › speed troubles
Page Index Toggle Pages: 1
speed troubles (Read 792 times)
speed troubles
Mar 11th, 2010, 1:22am
 
Hello,

After some time experimenting with processing i started using it in a proper project. But i feel like i have hit a  roadblock.  

The sketch is a prototyping software for a stage setup in a dance piece:  

What you are looking at is a top view of  frame on which 4 loops of ropes are span between different wheels/nodes. The speed of the ropes is controlled from an external sequencer over osc. The ropes will be painted black and white, forming patterns. The program lets you draw directly onto the ropes (left mouse button for white, right for black) The aim of the software is testing rope configurations (which are hard coded for now), painted patterns and movement sequences.

So far so good but i have a few questions:

- My main concern is the speed of the program, it is quite slow whether that could help in this case  So is it my sloppy programming or do i simply ask to much of processing  Will moving to another prograaming language help in speeding this up

- Moreover the speed is dependent on the frameRate, so if you render only one of the ropes it is much faster. I read some tips on the forum on multi threading, but can't seem to get my head arround it and i'm not sure if it will help in this case.

- Colorsequences are stored as an array of integers. saving & loading colorsequences is now done by writing this array to a .txt file.  Which seems a bit a clumsy, and ther must be better ways of saving.

I know it is quite a lot of code, but if some of the more experienced programmers could take a look at it, would be great.  Comments, tips on the code, GUI, and these questions are welcome.  

tnx!

zip can be downloaded here:
http://www.introspector.be/store/noumenon_v0_20_graphic-100311b.zip
Re: speed troubles
Reply #1 - Mar 13th, 2010, 5:15am
 
in my opinion processing definitely has some speed issues... maybe you show take a look at http://www.openframeworks.cc/. for my work with computer vision and real time video processing with complex algorithms in general it really did the trick. it is not quite your case and i am not sure that just by moving to openframeworks there will be an actual improvement but it is worth trying.

i tried running your code here checking the frame rate at each cycle of draw: drawing onto all 4 ropes and setting the speed of each to maximum the program ran steadily at 30fps. am i missing something?

kind regards,
p
Re: speed troubles
Reply #2 - Mar 13th, 2010, 9:30am
 
Hey Pedro,

Thanks for taking the time.  I'm glad you got it running fine.  Maybe not my sloppy sketching afterall Wink


What version/machine/graphics card are you using?

Did some more tests and came up with this:

1. In Processing 1.0.9 frameRate is below 10, while  in Processing 1.0.1, it runs between 20 and 30 FPS!   Undecided    Any known reasons for this?

2.  I made this sketch on a Sony Vaio with an ATI graphics card, which they plan on using for this piece. The sketch was running at 20-25 fps with all ropes and 30 with one.  Running the sketch on  a desktop with similar specs but an nVidia graphics card it seems works good at 30 fps (even while drawing on the 4 moving ropes).  Both machines are running windows vista.

So I'll guess I'll have to concvince the production company to buy a different machine.


regards,

corneel
Re: speed troubles
Reply #3 - Mar 13th, 2010, 10:15am
 
I did a test with Processing 1.1, but this didn't help.  Sad

Specs:
Intel Core 2 Quad CPU @ 2.40 GHz
4,00 GB ram
Windows Vista 32bit
nVidia GeForce 8600 GTS

Processing 1.01 runs at 30 fps
Processing 1.05 and higher at +- 6fps

I'll be fine using version 1.01 for now.  I wonder what might be the of cause this?  Some issue with libraries?  

regards,
corneel
Page Index Toggle Pages: 1