I developed a project in WinXP which consisted of a controller which would crossfade between several layers of video based on a sensor input through arduino. I don’t really know what the framerate was but it was quite fast, fast enough to look fluid, and I mean fullscreen.
Now I switched to a MacBook Pro which is more powerful than the already ageing windows laptop (LG S1 from 2006). The code porting was painless but for some reason now when I run it in fullscreen everything is absurdly slow. Like 4fps or even less.
Am I missing something obvious? Maybe it’s not using hardware acceleration? How can I tell?
Any advise is welcome.
I can post the code here if it helps.
Actually this is something I first developed in vvvv but which I ended up porting to OF since I knew that I was going to switch to mac soon. So now it’s kind of frustrating to see it run very slowly on mac but I’m sure I’m doing something wrong.
hmmm… sounds curious. I’m happy to take a look… can you recreate the problem without the arduino part?
some ideas about debugging speed issues.
first, disable the whole draw or whole update function first, to see what’s slow (drawing or updating). you can simply put return at the top, like :
then, as you discover the function that is slow, try commenting out the whole function and then put in the function, one block at a time and try to find a specific line that is causing the slowdown. I do this alot and can find out what’s slow.
there are also tools in xcode to profiile code … I haven’t used them yet, but I know they exist. there are some xcode guides around as pdfs / chms that could help…
some common causes of slow downs:
– reading from disk
– memory leak
– blocking operations that take a long time
rarer causes of slow downs:
– floating point error, like getting an array of nans
hope that helps!
I am curious if this is a quicktime issue.
What you describes reminds me of something I have seen before.
Can you see how fast it runs if you comment out all the non-movie code and have all the quicktimes playing at the same time?
If it is still slow can you wait till the movies have played through completely once and see if it speeds up after that?