Page 1 of 1

[Genhis] [1.1.59] map generation slower than usually

Posted: Wed May 11, 2022 9:44 pm
by AntiElitz
Hey I noticed that sporadically the map generation in the preview in much slower than usually. I run a 9900k. When I take a look at the task manager the cpu only shows to be used by 50% pretty exactly, instead of the 100% I get usually. The Processor has 8 cores / 16 thread. So it feels like maybe something with hyperthreading, but what do I know. Did not ever happen in .57 or earlier, so that introduction must have come recently. It's hard to say weather it influences the performance ingame, too. It was really hard for me to measure the ups difference between 8 core and 16 threads. If you have any ideas, let me know. I cannot reproduce it, but it will happen again, so let me know what to provide you with when it does.
Restarting the game fixes it. See here: https://clips.twitch.tv/TrappedHomelyWo ... LGxEIRd8lP

A thing I found out that may possibly be related:
For benchmarking ups I used factorio.exe --benchmark 1_clock1.zip --benchmark-ticks 216000--benchmark-runs 2 --disable-audio
however on the first run i get always much faster times than on the second
So I monitored my CPU and this is what I found. First run used 1 core 100%, second run used 2 cores 50% each (red marker shows switching time). This is reproduceable for me and happens like this every time. I'm not sure it is related to the above at all though.
https://cdn.discordapp.com/attachments/ ... nknown.png

Re: [1.1.59] map generation slower than usually

Posted: Fri May 20, 2022 2:09 pm
by Nefrums
I noticed the same issue with slow map preview generation twice yesterday. Both times it happened after playing the game for a while and then going back to generating maps.

Once it happens it is consistent, each map preview generation is affected, including the first. The only way to sole it appears to be to restart factorio.

I run on win11, 12900k.

Re: [1.1.59] map generation slower than usually

Posted: Fri May 20, 2022 3:06 pm
by Rseding91
This is strange... I tried looking into it but we haven't changed the code around map generation in the preview in over 2 years.

I don't know what to look into about this. If you ever figure out any way to reproduce it I can try to look into it more.

Re: [1.1.59] map generation slower than usually

Posted: Fri May 20, 2022 5:11 pm
by Rseding91
For the next version of the game I added some additional logging to the preview GUI.

So, once 1.1.60 is out; and this happens again. While in the GUI shift + click the 'randomize seed' button and it will start logging when the preview finishes.

Maybe that will help with figuring out what is going on.

Re: [1.1.59] map generation slower than usually

Posted: Sat May 21, 2022 6:48 pm
by Rseding91
OK, I found the cause but I have no idea why it showed up now vs any time in the past. The issue is described here: https://developercommunity.visualstudio ... own/552439

Re: [1.1.59] map generation slower than usually

Posted: Sat May 21, 2022 7:44 pm
by FuryoftheStars
Rseding91 wrote:
Sat May 21, 2022 6:48 pm
OK, I found the cause but I have no idea why it showed up now vs any time in the past. The issue is described here: https://developercommunity.visualstudio ... own/552439
From 2019…
the Windows OS Heap team […] are aware of this issue
…and they’ve obviously not done anything about it. Figures, right?