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.
IndexProcessing DevelopmentLibraries,  Tool Development › 100% cpu with oscP5 and void draw()
Page Index Toggle Pages: 1
100% cpu with oscP5 and void draw() (Read 2402 times)
100% cpu with oscP5 and void draw()
May 24th, 2005, 8:16pm
 
hi.

I've been trying to use oscP5 to connect processing and max/MSP.

Playing with the examples provided, i had a problem discussed in another thread (both programs comunicating correctly but nothing showing in processing screen). I eventually solved it with sojamo's explanation (add an empty void draw() function to the example's code), but...

with that solution i get 100% cpu consumage with processing. Is there anything i can do to solve this?

Thanks a lot.
Re: 100% cpu with oscP5 and void draw()
Reply #1 - May 24th, 2005, 10:36pm
 
If got the same problem. In some cases the process priority of the sketch task is high instead of normal. But I dont know why.
Re: 100% cpu with oscP5 and void draw()
Reply #2 - May 25th, 2005, 3:16am
 
unless it's the osc library, it's probably because with an empty draw loop you're getting a framerate of 100+ fps, which is making trouble. try setting framerate() to 30 or even 60 to see if it gets things under control.
Re: 100% cpu with oscP5 and void draw()
Reply #3 - May 25th, 2005, 2:08pm
 
hi,
i checked the cpu issue on pc and mac and it looks like on my mac cpu increases big time.. not to 100+ but almost. but if i set a framerate to 30 or something, cpu usage goes back to normal, so the framerate is the key, and the empty draw method is the evil.
on pc though without framerate i got 4% cpu usage and with a framrate of 30 i got 2%. so it seems no problem on pc then, but on mac.-
Re: 100% cpu with oscP5 and void draw()
Reply #4 - May 25th, 2005, 4:33pm
 
well, curiosly enough, i'm on a pc.

anyway, i checked it here at work and setting framerate(30) solves the problem. I'm sure it will be the same at home.

Thanks a lot. I'll continue my max/msp > osc > processing journey.
Page Index Toggle Pages: 1