[0.10.6] Clicking off and back locks the game for 5~ seconds

This subforum contains all the issues which we already resolved.
Post Reply
Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

[0.10.6] Clicking off and back locks the game for 5~ seconds

Post by Rseding91 »

When I click off Factorio (onto another window) and click back the game locks up for 5-7 seconds.

With 3 screens and modding I often click off the game and as I explore more the time it's locking up is getting longer. It wasn't so bad at first when it was half a second but now that it's 5+ seconds it gets very annoying.

Savegame: https://www.dropbox.com/s/pqmkqpk5zj5hca2/Mods-b.zip
Mods used: https://www.dropbox.com/s/bxg8sbao1vmxskc/mods.zip
If you want to get ahold of me I'm almost always on Discord.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by kovarex »

Hello, when you do this, the game has to copy all the graphics stored in ram back to video memory (vram), the more graphics you have (mods), and the slower the drawing from ram->vram is the longer it takes.

If you have shared video ram (part of the video memory is on normal ram) on your video card, this process is usually much longer, so it might be the reason it takes so long.

But it is not a bug.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by Rseding91 »

kovarex wrote:Hello, when you do this, the game has to copy all the graphics stored in ram back to video memory (vram), the more graphics you have (mods), and the slower the drawing from ram->vram is the longer it takes.

If you have shared video ram (part of the video memory is on normal ram) on your video card, this process is usually much longer, so it might be the reason it takes so long.

But it is not a bug.

Why does it lag when clicking back to the game but not when clicking off of it? I have plenty of video RAM on my graphics card (GTX 770) so it shouldn't ever need to flush it/clear it when clicking off the program. It seems to only happen in Factorio - other windowed games don't have the slowdown. It's unfortunate if it has to stay this way. I click off the game very often to talk to people/interact with other programs and it's very annoying waiting 5+ seconds each time I click back :\
If you want to get ahold of me I'm almost always on Discord.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by kovarex »

I tried it with your set of mods, and the game locked for like 1/4 of second (I have GTX 760), so it has to be something specific to your system or setup, do you have any idea?

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by SilverWarior »

kovarex wrote:Hello, when you do this, the game has to copy all the graphics stored in ram back to video memory (vram), the more graphics you have (mods), and the slower the drawing from ram->vram is the longer it takes.
Wait why is Factorio unloading its graphics from VRAM when loosing focus in windowed mode? This should only happen when switching to another application when game is run in full screen mode or the game window is minimized.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by Rseding91 »

kovarex wrote:I tried it with your set of mods, and the game locked for like 1/4 of second (I have GTX 760), so it has to be something specific to your system or setup, do you have any idea?
Did you use my save-game as well? It doesn't happen on new maps (it's 1/4th of a second like you said). However on my save-game linked above it happens. If you're using my save-game and it's only 1/4th of a second for you then that's odd.


Other information about my setup:

Windows 7 Pro x64 SP1
32 GB of RAM
GTX 770 graphics card
3 monitors: Left: 1920x1080, Center: 2560x1600, Right: 1920x1080
Running Factorio full-sized (but not full-screen) on the center monitor
If you want to get ahold of me I'm almost always on Discord.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by kovarex »

Right, with your saves, it took some seconds.

So I checked the code, and found out, that the refresh of video memory is really needlessly called even for the event SWITCH_IN, so I just removed the call and it now doesn't slow down at all in this case.

So it is fixed for 0.10.7

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.10.6] Clicking off and back locks the game for 5~ sec

Post by Rseding91 »

kovarex wrote:Right, with your saves, it took some seconds.

So I checked the code, and found out, that the refresh of video memory is really needlessly called even for the event SWITCH_IN, so I just removed the call and it now doesn't slow down at all in this case.

So it is fixed for 0.10.7
Awesome! You guys are amazing :D Loving Factorio (as you can see by the game-time on that save file I've played quite a lot).

Thanks again.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”