View Full Version : Something wrong with CPU usage?
December 23rd, 2005, 03:22 AM
I've mentioned before that WW uses nearly 100% CPU while I'm playing... but now I've just realized that even the launcher uses that much juice.
I don't think it's normal. I've got a fairly good computer, a P4 with 512mb RAM and a 128mb video card. So why would the launcher, which is a simple graphical menu, load my CPU to that level?
Anyone has an idea on the possible causes? Is there something very specific in the game's threading? Something somewhere must be polling like crazy, or maybe missing some thread_yield() calls.
December 23rd, 2005, 04:13 AM
Most games use all the CPU they can get... It's just a bit of extra trouble to make it more efficient and since you're not likely to multitask much while playing a game anyway, I don't find it terribly important.
December 23rd, 2005, 04:20 AM
Well I play both in windowed mode and in full screen, depending on whether or not I'm waiting for an important e-mail!
I was just surprised that the pre-game menu would use up CPU too.
Thanks for the explanations though.
December 24th, 2005, 01:36 AM
It does pose a bit of a challenge when testing, though. Alt-tabbing between the desktop (or Firefox or Textpad) and WW causes my system to chug. And I'm sportin' some pretty good hardware -- Athlon64 3500+, 1GB ram, 256mb Radeon x700 -- so it's challenging.
Not that I expect you to fix it just for little old me, and I'll continue playing and testing, but I did want to chime in. http://forum.shrapnelgames.com/images/smilies/happy.gif
December 24th, 2005, 02:16 AM
It's just my old-fashioned programming techniques... The launcher uses up CPU because it's running in a loop waiting for user input... It would've been easier to fix this in the launcher than the game (as it's not performance-critical) by sleeping for a period of time each time it loops, but I didn't think about it. Maybe some time in the future I'll look into this. (One of the problems is I don't think SDL has a portable sleep function so I'd need to use the win32 api and the Mac port would need to use something different)
vBulletin® v3.8.0, Copyright ©2000-2013, vBulletin Solutions, Inc.