Chart Refresh lag when moving mouse

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
VADemon
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Mar 23, 2016 4:49 am
Contact:

Chart Refresh lag when moving mouse

Post by VADemon »

At first when we started playing I didn't notice anything but after taking a break and figuring out the cause of the issue, the game became unplayable to me.

Whenever I move the mouse (higher speeds yield ~20ms) the Chart Refresh value goes up to 16-19ms and the game drops down to 2-5 FPS. After stopping the mouse movement the client begins to catch up (without showing any messages) and it takes up to ~30s to return to normal speeds (you can't reliably open inventory or move the character during that period). Based on the F4 timings, the script time slightly drops while the Chart Refresh is high. All this is seen on the map we're playing on.
I've tested that map in Singleplayer - the issue persists but it's less noticeable because it simply feels like the whole game is slowing down.
Changing the game.speed to 0.5-0.8 doesn't help, just at 0.2 the lag is less noticeable because each frame has more time to compute. Furthermore, I managed to get up to 22-25ms Chart Refresh with game.speed=0.2

Testing a fresh map without mods: When you start to move the mouse rapidly you can see a small increase in Chart Refresh value (from ~0.003 to ~0.009). Looks like the same negative effect is amplified for huge bases/mods. Sadly, I do not have a Vanilla map to try it out.
Also, the slowdown is still caused if the Factorio window is NOT active, but there's NO SLOWDOWN when the character is moving and the mouse is still. Hovering over the toolbar has the same effect, having no items in inventory (including armor) doesn't help.

Hence 2 questions:
1) Is it caused by installed mods (although none of the script timings are reliably increased while moving the mouse); if so, what exactly to look for? (I know Lua)
2) Is it caused by Factorio itself and is there any way to reduce the impact?

Factorio version: 0.15.25
Server CPU: i7-3770 @ 3.4 GHz
PC CPU: Ryzen 7 1700 @ 3.8 GHz
- I have the map saved if you want to try it out
Mod List
Attachments
Screenshot after mouse movement, the client is still slowed down by the invisible catching up phase
Screenshot after mouse movement, the client is still slowed down by the invisible catching up phase
catching-up.jpg (582.66 KiB) Viewed 1044 times
Screenshot taken while I was moving the mouse
Screenshot taken while I was moving the mouse
moving-mouse.jpg (582.93 KiB) Viewed 1044 times
Just loaded the map, standing. On the server
Just loaded the map, standing. On the server
normal.jpg (583.17 KiB) Viewed 1044 times
Post Reply

Return to “Technical Help”