On Sep 26, 2005, at 10:13 AM, Sam Rowlands wrote:
Hey Guys,
How do I give my application more CPU time?
Use a thread or a loop with #Pragma DisableBackgroundTasks. The latter
is not recommended ;-)
I have found that when my application/game is running the most CPU I
can obtain is 51% and this gives me a frame rate of 24 when its full
screen (1280*864 on a PBG4 1.5Ghz). Window Manager steals 15% but I
think this because I am trying to redraw the contents a lot.
"redraw the contents" - you mean calling refresh?
I doubled my frame rate when I started drawing directly to the window
background instead of drawing to an image and then the Window
background. Albeit I know this will produce ugly results on Windows
atm. My Windows Box is non-functional at the moment (another story) so
I am focusing on the Mac Version until I can get it working again
(again).
Which is technically faster, using a constant loop in a method or
using a thread of a priority 10. The only reason I ask is because the
constant loop appears faster but there might be something I am doing
wrong.
The loop is faster but not good for a windowed app (the OS considers it
frozen, you can't move the window or use the menu bar, etc.). Should be
fine fullscreen though.
I am sure that there is a lot I code to speed up my code here and
there, but it does look a wee bit disappointing at the moment that I
can only get 24 frames on a 1.5 Ghz.
Definitely! How much drawing are you doing, and how are you doing it?
You mentioned drawing to the window background, so I presume you are
using the graphics class?
Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software
<http://www.fireyesoftware.com/>
AIM, Yahoo, MSN: crazedglkid
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|