Since I started my little project I was concerned about it eating up my processor up to 50%. I google'd a bit and found this topic:
https://forum.orx-project.org/discussion/885
My MainClockFrequency was at 60 and VSync was on - it seemed that turning it off would help but unfortunately it did not. I checked the tutorial projects (so that I could check if it's not problem with my code) and noticed that every one of them gobbles up my processor power (I tried the VSync on/off and MainClockFrequency options). I'm running Windows XP. I tried to run my executable on my girlfriend's laptop (Windows Vista :huh:) and result is the same.
Any tips on what could be wrong?
Comments
If it's higher than 60, you should check your graphics driver configuration and see if you haven't selected: never use vsync in the options (in which case it won't let the applications decide if they can use it or not).
Is that a problem that was already present with the version you sent me? If so, I'll check it tonight.
Yes, I had the same problem with the version I've sent you.
I'll still try your code tonight and see if I get the same result as you with no VSync and using the MainClockFrequency.
Could you send it again to me?
Sorry for the delay but I wanted to try it on a few different computers before reporting.
VSync worked on all of them (all using NVidia or ATI cards) and the CPU was about 3%-8% depending on the machines.
Using MainClockFrequency with VSync off was indeed maxing out cores (16.6% on a 6-cores, 12.5% on a 8-cores and 50% on a dual core).
I'll look into that issue soon.
It's been a while and I left my project untouched, mainly because I found a job and been writing the text part of my MD. My question is, did anything change regarding this topic?
I think I remember fixing something about MainClockFrequency a while ago but I can't clearly recall what... So I guess I'll try your project again and see how it behaves.
So many things happening here, sorry for the lack of consistency in the follow up.
Oh and congrats for having found a job.
When using MainClockFrequency = 60, with VSync turned off, the CPU was at 4-5% (on a quad core, so 20-25% of a single core) and had a peak at 6% (30% of a single core) when I kept moving around with about 30-40 balls spawned.
It's great to see that ORX is constantly developed, watched over and fixed when it is needed. You guys are awesome
I still have your PM sitting in my inbox as I still owe you some code to show how to use parenting more efficiently but things have been crazy and I haven't found much free time, sorry about that!
It's still on my TODO list though.