Game takes 100% cpu when paused

Bugs that are actually features.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Game takes 100% cpu when paused

Post by mrvn »

When the game is paused because the tech tree pops up or when opening the game options / load / save requester it still uses 100% cpu while the display is 100% static. Nothing changes from frame to frame.
Loewchen
Global Moderator
Global Moderator
Posts: 10212
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Game takes 100% cpu when paused

Post by Loewchen »

Can not reproduce on 14.20 and windows.
Attachments
Fac_CpuUsage.JPG
Fac_CpuUsage.JPG (41.66 KiB) Viewed 3365 times
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Game takes 100% cpu when paused

Post by aubergine18 »

Not sure if it's related or worth investigating, but on late 2012 iMac all CPU cores utilisation increases by around 10-15% when game is paused.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Game takes 100% cpu when paused

Post by orzelek »

I think more details about actual CPU might be needed. CPU %-age will vary a lot by type and speed of CPU in question.

Mine shows about 2.5% when paused which would translate to about 1/4th of a core CPU usage on i7-4790K.
I'd say it's still quite a bit for idle game but not bery bad overall.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Game takes 100% cpu when paused

Post by steinio »

Maybe the CPU throttles down to minimum frequency what also looks like 100% load but only with 800MHz?
Image

Transport Belt Repair Man

View unread Posts
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Game takes 100% cpu when paused

Post by mrvn »

It's an Atom 330 running Linux and throtteling down isn't enabled. Version 14.19 of factorio.

An Atom 330 is rather (painfully so after playing a bit, not playing on that system again) slow so it might well be that others see less CPU usage. What I do see is that the framerate goes up from ~10 to 60 when I pause the game so it does do less. But it shouldn't do any screen redraws at all, nothing changes, nothing is animated. So why would it draw 60 frames a second? The game should be sleeping, waiting for an X event to wake it back up.
Loewchen
Global Moderator
Global Moderator
Posts: 10212
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Game takes 100% cpu when paused

Post by Loewchen »

mrvn wrote:But it shouldn't do any screen redraws at all, nothing changes, nothing is animated. So why would it draw 60 frames a second? The game should be sleeping, waiting for an X event to wake it back up.
That sounds more like a complete misconception on how it should work, of course the game will still try to render 60fps when the game is paused, it simply would not know if anything has changed unless it has done so, and your mouse pointer is still active.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Game takes 100% cpu when paused

Post by mrvn »

Loewchen wrote:
mrvn wrote:But it shouldn't do any screen redraws at all, nothing changes, nothing is animated. So why would it draw 60 frames a second? The game should be sleeping, waiting for an X event to wake it back up.
That sounds more like a complete misconception on how it should work, of course the game will still try to render 60fps when the game is paused, it simply would not know if anything has changed unless it has done so, and your mouse pointer is still active.
The dialog pauses the game. It easily knows that nothing is going to change. The game also knows when the mouse moved. No move, nothing to redraw. And if it moved then you only redraw the parts around the mouse pointer usually.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15797
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Game takes 100% cpu when paused

Post by Rseding91 »

mrvn wrote:
Loewchen wrote:
mrvn wrote:But it shouldn't do any screen redraws at all, nothing changes, nothing is animated. So why would it draw 60 frames a second? The game should be sleeping, waiting for an X event to wake it back up.
That sounds more like a complete misconception on how it should work, of course the game will still try to render 60fps when the game is paused, it simply would not know if anything has changed unless it has done so, and your mouse pointer is still active.
The dialog pauses the game. It easily knows that nothing is going to change. The game also knows when the mouse moved. No move, nothing to redraw. And if it moved then you only redraw the parts around the mouse pointer usually.
That's not how any of this works... Moved to not a bug.

Just because the image appears static does not mean it is static.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”