Celestia is busting my CPU?

General discussion about Celestia that doesn't fit into other forums.
Topic author
Vigor

Celestia is busting my CPU?

Post #1by Vigor » 24.04.2003, 14:00

I use win32 version of celestia and I have noticed how much of CPU usage it has in idle loop (that is when you pause time etc). Celestia uses 99% of my CPU even if I minimize it to tray and pause time. The only way I can stop it to eat my cpu is to open help->license or something like that, but in that case it's not possible to minimize window. Any suggestions?

Sum0
Posts: 273
Joined: 10.03.2002
With us: 22 years 9 months
Location: Norwich, UK

Post #2by Sum0 » 24.04.2003, 14:10

I don't know why, but it happens on all systems - Celestia always has something like 99% of CPU usage. Unfortunately, you'll just have to live with it (unless it's a fixable problem...).
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."

Topic author
Vigor

Post #3by Vigor » 24.04.2003, 14:40

To me that looks like bad programming even if most FPS have the same problem :)

Jugalator

Post #4by Jugalator » 24.07.2003, 03:31

Bringing up an old thread to say I noticed this as well and this generates so much heat that I'm not sure it's very healthy for my CPU. The extra fans spin up to try to cool it down, but that makes my computer sound like an airplane. :) Which isn't very fun in the long run, and also worrying how much it will shorten your CPU life. :(

I wish the idle loop of Celestia didn't consume 100% CPU. It must have something to do with Celestia trying to do something as fast as possible (redrawing screen??), and not something like max 30 frames per second, which should be good for anyone.

Guest

Post #5by Guest » 24.07.2003, 03:40

Just adding to say that it seems that the high CPU usage comes from recalculating the positions of all visible objects as fast as possible, according to another thread. I wonder if this is really necessary, or if a thread "sleep" timer could be added so it does its recalculation work, waits 50-100 milliseconds or something like that, recalculates, etc. That could make a rather huge difference with no special difference to the user.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Post #6by chris » 24.07.2003, 04:12

Celestia draws as many frames per second as it can up to a maximum equal to your refresh rate--at that point, it will idle during the extra time.

Recalculating the positions of objects every frame is essential. Only recalculating every 50-100ms would cause all manner of headaches. Anyhow, Celestia is probably limited by rendering speed more often than than orbital computation, so this wouldn't help most people.

The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .

But, if you run Celestia in the foreground, it will use up every CPU cycle it can get to try and maintain a frame rate equal to the monitor refresh rate. 30 frames per second is definitely not good enough for everyone. Anyway, running your CPU at full bore isn't going to shorten it's life . . .

--Chris

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Post #7by Paolo » 24.07.2003, 09:57

chris wrote:The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .


Please consider this eventuality 8O . The above mentioned issue is in my feature request list and I think that should be really useful.
Briefly my needings are to being able to use conveniently word processors, image editors or other programs without exiting Celestia.
I think that probably should be sufficent if Celestia suspends only the OpenGL rendering when the process hasn't the input focus. :D

Bye - Paolo
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Jugalator

Post #8by Jugalator » 24.07.2003, 14:30

chris wrote:But, if you run Celestia in the foreground, it will use up every CPU cycle it can get to try and maintain a frame rate equal to the monitor refresh rate. 30 frames per second is definitely not good enough for everyone. Anyway, running your CPU at full bore isn't going to shorten it's life . . .

--Chris

OK, just thought that any refreshes to the "state" of Celestia more than 30 times per second wouldn't be noticeable to us anyway, but I guess it's unfortunately more to it than that. :(

CPU heat above it's specified maximum temperature does shorten the lifespan, so let's hope I'm below that one. :) (I should be unless they mounted inadequate fans)

I also agree with Paolo and think this would be a useful feature to lessen the need to play around with process priorities. ;)

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 5 months
Location: Colorado, USA (7000 ft)

Post #9by don » 24.07.2003, 17:24

chris wrote:Celestia draws as many frames per second as it can up to a maximum equal to your refresh rate--at that point, it will idle during the extra time. ... The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .


Howdy Chris,

As a suggestion, what about adding a Performance option to one of the menus, so the user can set how they want Celestia to function on that machine? The options could include:

* Max Frames Per Second (FPS)
* Idle when not in-focus or not on-top
* Others?

The Max FPS sub-option could contain pre-sets (checkboxes) if that would make programming easier. Folks with slower machines could use lower settings, and fast machines use higher settings. This would at least give the user a way to set it themselves.

The Idle option again gives the user control of CPU usage when Celestia is not the active window (minimized, not in focus, not on top, whatever it's called these days <smile>).

Personally, I have no problem with FPS or CPU usage, or being able to run other programs at the same time because I have a 3.06 GHz processor. My "game" machine has a 1.3 GHz, so Celestia might be a whole lot slower and maybe not run additional programs at the same time very well.

Bottom Line: I'm just suggesting that you give some control over Celestia's use of the CPU to the user, instead of trying to hard-code this or that, which may be good for user X but not so good for user Z.

Cheers for now...

-Don

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 8 months
Location: San Sebastian (Spain)

Post #10by jamarsa » 24.07.2003, 18:08

don wrote:As a suggestion, what about adding a Performance option to one of the menus, so the user can set how they want Celestia to function on that machine?


I'd rather suggest to put it in celestia.cfg, as it isn't an option you are selecting everyday... We don't need to overload the options dialog with scarcely changed features.

JackHiggins
Posts: 1034
Joined: 16.12.2002
With us: 21 years 11 months
Location: People's Republic Of Cork, Ireland

Post #11by JackHiggins » 24.07.2003, 18:33

jamarsa wrote:I'd rather suggest to put it in celestia.cfg, as it isn't an option you are selecting everyday... We don't need to overload the options dialog with scarcely changed features.

Even if I hardly ever used it, I'd prefer to have the option within celestia, so I don't have to exit & restart evey time... It's almost always better to have the settings in one place, rather than spread in many places, don't you think?
- Jack Higgins
Jack's Celestia Add-ons
And visit my Celestia Gallery too!

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 5 months
Location: Colorado, USA (7000 ft)

Post #12by don » 24.07.2003, 18:34

Javier: Yes.

Please see my post on the Developers forum: http://ennui.shatters.net/forum/viewtopic.php?t=2934

-Don


Return to “Celestia Users”