[0.16.51] Large save for potential map load/save optimising

Bugs that are actually features.
Post Reply
Hexicube
Fast Inserter
Fast Inserter
Posts: 204
Joined: Wed Feb 24, 2016 9:50 pm
Contact:

[0.16.51] Large save for potential map load/save optimising

Post by Hexicube »

Note: I am not actually reporting a bug, but since this is where performance problems go, I figured this is the best place.

I have a 350MB save where I explored 125k tiles to the right, and it takes a long time to load/save as expected. I've decided to offer it as an optimisation target, to see if extra speed can be squeezed out. Typical saves load in under a second on my machine, this save takes at least 30 seconds.

The save has mods on it, but they should not be needed for testing the save. In fact, migration on such a large save might also provide extra targets for improvements. The save is also from an older version of 0.16.

https://www.dropbox.com/s/v30e0s4vm3h28 ... t.zip?dl=1

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

Re: [0.16.51] Large save for potential map load/save optimising

Post by Rseding91 »

Thanks for the save file.

I've looked at several large save files when it comes to time to load and save and there's nothing new around them. You've got a 355 MB compressed save file which decompresses into 972 MB of raw data. That 972 MB of raw data loads into memory at around 8 GB.

Loading takes 20 seconds for me which means the game is decompressing the zip at 17.75 MB/s of compressed data into 48.6 MB/s of uncompressed data into 409.6 MB/s of runtime data. That's all well within normal speeds - simply there's a *lot* more data to process with a save file that large.

When I run it through the profiler virtually all of the time is spent loading the uncompressed data into the runtime data since the zip -> uncompressed is done in parallel with the uncompressed -> runtime and the uncompressed -> runtime has a much larger inflation ratio compared to zip -> uncompressed: zip->uncompresed: 1 : 2.73, uncompressed->runtime: 1 : 8.42.

Basically: you've made a large map - it takes a proportionally large amount of time to load/save :)
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”