Page 1 of 2

[Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 8:30 pm
by smooth_mcdouglette
Whenever biters attack, the game stutters quite badly and UPS dips fairly dramatically for me.

I was playing stable 1.0.0 just yesterday and I never encountered any such UPS or FPS drop, so I believe it's related to 1.1.0 experimental.

The dip seems to only occur when biters attack. It doesn't matter if they are on screen or not, or what my zoom level is.

My system specs are:
- Ryzen 7 2700
- GTX 1070
- 16 GB DDR4 RAM
- Game is installed on SSD

I was using nvidia's support for my freesync monitor, but disabling this did not have any effect. Disabling vsync in the in-game settings, and in the Nvidia control panel likewise did not have any effect.

Here are the debug numbers for when the game is running fine:
20201125150838_1.jpg
20201125150838_1.jpg (1.24 MiB) Viewed 6652 times
Here is what it looks like when biters attack:
20201125152200_1.jpg
20201125152200_1.jpg (984.46 KiB) Viewed 6652 times
Here is my log file:
factorio-current.log
(6.84 KiB) Downloaded 131 times
And my save game:
Goodbus.zip
(5.64 MiB) Downloaded 130 times

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 8:34 pm
by smooth_mcdouglette
I have also just now noticed that the stuttering goes away immediately after the alert icon in the bottom right disappears. Perhaps it's related to drawing the arrows?

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 8:49 pm
by Rseding91
Can you post a save where it's running slow? When I test it - even in debug mode - I get zero slowdown.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 8:51 pm
by Jap2.0
There's a just over tenth of a second spike in "Gui update", do you see that when hovering over the alert or something, or is it just generally stuttery?

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 9:14 pm
by HunD34TH
Same issue here, stuttering only, when alert icon is showed

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 9:55 pm
by Rseding91
I can't reproduce any slowdown when I load the saves. Can you post your config.ini file as well? Maybe it's realted to some setting you have different from me.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Wed Nov 25, 2020 11:04 pm
by steinio
@OP do you use Steelseries keyboard or mouse?

I have the described lags with it enabled.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 12:23 am
by smooth_mcdouglette
Rseding91 wrote:
Wed Nov 25, 2020 9:55 pm
I can't reproduce any slowdown when I load the saves. Can you post your config.ini file as well? Maybe it's realted to some setting you have different from me.
Here:
config.ini
(27.28 KiB) Downloaded 140 times
steinio wrote:
Wed Nov 25, 2020 11:04 pm
@OP do you use Steelseries keyboard or mouse?

I have the described lags with it enabled.
I do have a Steelseries mouse, and in fact I did just get it very recently, but this issue was not occurring prior to updating to the experimental 1.1.0 branch, even with the Steelseries mouse.
Jap2.0 wrote:
Wed Nov 25, 2020 8:51 pm
There's a just over tenth of a second spike in "Gui update", do you see that when hovering over the alert or something, or is it just generally stuttery?
It seems that this occurs often when I get gui alerts, although not always. It does, however, always occur when biters attack. Basically what happens is the game drops a bunch of frames every half a second or so in a repeating pattern. It's sort of a 'lurching' behavior, where I will get consistent 60fps for about 0.5 seconds and then it will hang for about 0.5 seconds and so on. This occurs for around 30 seconds or so (I will record hard numbers and post them this evening) before the game switches back to butter smooth 60 seconds. It seems the transition occurs when the alert icon disappears from the GUI.

I will continue paying attention to the behavior and see if I can notice anything else that could be the culprit.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 12:30 am
by smooth_mcdouglette
Rseding91 wrote:
Wed Nov 25, 2020 8:49 pm
Can you post a save where it's running slow? When I test it - even in debug mode - I get zero slowdown.
Here is a save where the slowdown is currently occurring for me
Goodbus.zip
(5.84 MiB) Downloaded 140 times

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 12:33 am
by robot256
Steinio asked about the Steelseries devices because Factorio 1.1.0 was the first version with "Steelseries Gamesense support" built in. So it would make sense that if a bug in their GameSense usage was slowing it down (perhaps trying to illuminate the kb with an alert) that it would only happen in 1.1.0. You might try messing with that part of your setup to see if anything alters the game behavior.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 12:39 am
by HunD34TH
I have a SteelSeries keyboard and mouse too, disabling this feature (ingame, other settings menu) resolves the problem (for me)

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 12:45 am
by smooth_mcdouglette
Disabling the Steelseries integration did indeed resolve the issue.

Additional details: I do have a razer blackwidow chroma as well. Perhaps the integrations are competing? But disabling the razer chroma integration did not solve the issue. Only disabling Steelseries did.

Re: [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 2:17 am
by Rseding91
Hmm ok I'll connect the steelseries keyboard I have and see what I can find.

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 4:11 am
by Rseding91
I loaded it up and tested and was able to reproduce some slowdown. Nothing like the FPS drop shown in the first screenshots but still some.

It might be fixed for the next release now. I'll have to wait and see what everyone here experiences when it's out.

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 8:53 am
by Squelch
A couple of observations that may be related:

The app does not appear to be fully implemented for me. I have an older three zone rgb keyboard on an MSI laptop. Attempting to configure it for "dynamic colors" results in a crash of the Steel Series process.
Steelseries app.PNG
Steelseries app.PNG (2.35 MiB) Viewed 6370 times
It would seem that the feature is enabled by default - detected by the driver?, but final control being given to the game settings. Could this feature also be made opt in for Factorio instead please?

Personally, this is something that I'd prefer to explore in my own time instead of having the colours suddenly change on me or performance impacting whistles and bells as it seems here. (I haven't had chance to confirm the latter yet)

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 8:55 am
by posila
Squelch wrote:
Thu Nov 26, 2020 8:53 am
Personally, this is something that I'd prefer to explore in my own time instead of having the colours suddenly change on me or performance impacting whistles and bells as it seems here. (I haven't had chance to confirm the latter yet)
If it is opt-in (instead of opt-out), we won't get nice "OMG, my keyboard changes lights when I start Factorio" reddit posts, which are whole point of this. ;)

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 9:17 am
by Squelch
posila wrote:
Thu Nov 26, 2020 8:55 am
If it is opt-in (instead of opt-out), we won't get nice "OMG, my keyboard changes lights when I start Factorio" reddit posts, which are whole point of this. ;)
You speak the truth ;)

I was disappointed to find that what I thought was per key rgb was in fact just three blocks on this machine, so I haven't given it much love. However, although it's 4 years old now, there does appear to be some issues with SS in general- either due to older hardware, or something else, and not for something that is really imperative to playing the game. I'll do some more testing in the name of "OMG RGB!" and keep an eye on this issue anyway.

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 2:30 pm
by jagholin
might be related, when I was observing biters today(version 1.1.1) I also noticed something strange: just before launching an attack, the biter group will freeze on the spot for a couple of seconds. It's very noticeable, because the biters in the attacking group usually move around all the time.

I don't know whether it coincides with game freezes/ups drops, as i don't think I have any(and my base is not that large for now).

I don't have any fancy keyboards, only a razer mouse.

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 5:34 pm
by invisus
Squelch wrote:
Thu Nov 26, 2020 9:17 am
I'll do some more testing in the name of "OMG RGB!" and keep an eye on this issue anyway.
Image

Re: [Rseding91] [1.1.1] Stuttering and big UPS drop when biters attack

Posted: Thu Nov 26, 2020 5:48 pm
by Rseding91
Note that the other two keyboard RGB implementations have zero issues with performance. It's the REST API that SteelSeries provides that's an issue; it's just a slow way to do it over a DLL like the others.

I had to do a bunch of work-arounds to keep all of the slow API calls in another thread to not block the main game logic. Normally that isn't an issue... but I guess it is for SteelSeries stuff.