[Fixed 1.13][Bug 1.11] FPS spikes with big factories

First of all, wonderful game.

So… I tried building a factory without an output of one car every 2 seconds (everything researched + all upgrades). For 2/3 of the build I had an almost constant 75 FPS, but I noticed 2 specific circumstances where FPS would drop massively.

One problem is when the factory runs out of power, that causes the FPS to drop to more than half, with noticeable lag pauses. It’s easily solved, just build more power stations, and the FPS goes back up to 75 FPS (after a short while).

Another problem is when there is a break in the supply chain. That instantly causes a massive FPS spike that cripples the game. I noticed that you optimized this for 1.07, but…

As I said, things kind of worked well for 2/3 of the build. But as I had built out the whole production line and I started ramping it up to 1 car/2 sec, as soon as half the line was filled with cars, the game just came to a halt. We are talking less than 1 FPS. Granted, I know that my factory is a bit extreme. but that’s the fun part :slight_smile:

BTW: I tried attaching the save file, but it was too big, so here is a Google Drive link: drive.google.com/open?id=0BzJmU … 1VwbmVjTlE (BTW: I’m no longer apple to load this save. It crashes the game very time).

Anyway, love the game.

Hi, can you also post the custom map you are using? I cant attempt to load the save without it :frowning:
Cheers!

Sorry, I didn’t realize the save isn’t also saving the mission layout. I have long since change the mission file (which would explain why I can’t load the factory anymore).

BTW: You might want to change that for future updates hint hint :wink:

Is it bigger than this one? I just coded some optimizations that runs this at 58FPS for me (Fraps counter top left). My specs:

i7 6700 @3.40GHZ
16 GB RAM.
GeForce GTX980 TI

Where are savefiles stored anyway? I can’t find them in the Production Line directory.

Hi Adref,

take a look into

\Documents\My Games\productionline\savegames\

The .jpeg is not necessary because it’s just a screenshot at the time of saving but the .xml file contains all data.

Kind regards

Thanks.

I have similar problems.

I built a big factory and everything works fine until i start the production. After I have around 50-100 cars rolling on the assembly line the game starts lagging badly. FPS starts dropping to zero for a second. More cars, zero FPS more often.

Doesn’t seem hardware related, because nothing(CPU, GPU, RAM, VRAM) is stressed over 50% at any times. Not even during the lags.

Running a X6 1075T@3,5GHz, GTX1050 and 8GB of RAM.

Hi elliV,

I’ld like to take a look into your savegame. Would you please attach it?

If you have problems with 50 to 100 car WIP the enclosed savegame should be the hell because of ~ 150 cars in production process …

Thanks in advance!
MaN1aC_1-09_savegame.rar (1.02 MB)

That was interesting. That MaN1aC_1-09 gives me a steady 60 fps(limited) and is a lot bigger.

My save attached.
elliV lag.rar (825 KB)

Thanks for the savegame. With this I have the same lags. Looks like the long distances between some stations may cause this.
The vehicles turn into status red while going around half of the facility but still move …

Kind regards

Yup I noticed this yesterday, there is a limit to how far ahead cars scan for the next slot and I might have to remove that.

Sorry for the wait, Cliff.
Actually, that looks about the same size. But I had a lot more cars running down the conveyors.

I will see if I get the time to play this weekend and build another monster.

Hello,

I have the game now for 6 days and love it.
Now i have a full purchase factory and everything bought.
So the factory make all parts by itself and then uses it tho build the cars.
Almost all space is used and it worked well.
But today i load the game again after i played with my son on his factory.
Now its lagging as hell.
It is in version 1.10.

How can i place a save file on this forum?

Best regards,
Peter

on this savegame, everytime i put a ressource conveyor, the game is very slow. ( laggy )
the difference with 1.10, this time after ± 20 seconds, the speed is back to normal.

i have a i5 6600k
32gb ram
ti 980 gpu
m2 ssd drive.

thanks :slight_smile: i see a lot of improvments every patch. keep it up :slight_smile:
new9.zip (1.21 MB)

Hi,

made the same and worse experience.
At least I’ve had the fps drop even if I wanted to place a stockpile or slot. The last time I took a look at the taskmanager the game consumed > 66 % of the CPU and > 1400 MB RAM. One core ran at nearly 100% but as soon as the fps dropped the CPU usage also went down. This effect gets stronger with the time you play.

[Edit: 2017-03-03]
As soon an the RAM usage passes 1600 MB the program gets critical and any save (manuel and auto) will fail. The highest memory usage I have seen was 1643 MB just a moment before the autosave started. Even if loading a huge factory and keep the game running at normal speed the program will get out of memory some time.
[/Edit]

It all ended into the error message ‘Failed to set Save file buffer:…\src\SIM_SaveGame.cpp 118’ but the autosave.xml was already been written so it contains nothing now -.-

Because of this 0 byte file the game will not load any savegame befor it is overwritten or deleted. So the last savegame is one I made 3 hours ago with a lot of changes to be done again. In such a situation it would be great if the autosave will not overwrite the last autosave file. Two files in alternated use would be more convenient in such a case.

[Edit] One additional note: As soon as the fps drops the simulation processes do not run synchronized. Production and manufacturing slots will remain at ‘Not sufficient Stock’ or ‘Wait for line’. So every interference will result in a lesser efficiency and is visible at the Efficiency graph.
[/Edit]

So attached the log files, the last working savegame and the custom map for this savegame.

My gaming rig:
I7-6700K
16 GB RAM
GTX980
Windows 10 Pro x64
mission_crazy8.txt (5.47 KB)
crazy8-1.11.rar (1.09 MB)
errors.txt (243 Bytes)
debug.txt (340 Bytes)
drawdebug.txt (849 Bytes)

there is an attachments tab below your text. + Add files.

If you wish to attach one or more files enter the details below. You may also attach files by dragging and dropping them in the message box.

savegames are located in \Documents\My Games\productionline\savegames
you have to .zip it if you want to add it here. there is a size limitation.

btw. it’s version 1.11 now and the lag is mostly gone. in some occasion it lags but after 20 secs or so it stops.
enjoy 1.11 :slight_smile:

Mine lags like crazy if i do anything to the resource conveyors… place one, break one, look at them funny and the game lags for about a minute solid
then it seems to run fine again.

that being said I’m running at 240 cars per hour (2 cars per second in 1.10) and need thirteen exporters to keep up

Same on my side …
But there is another topic related to this so I’m not sure if this could be merged …

Done…

There seem to be a few slowdowns related to disconnecting/reconnecting resource conveyors.