Why can't data/atlas caching not be turned on from the GUI?

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.
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Why can't data/atlas caching not be turned on from the GUI?

Post by mrvn »

In config/config.ini are three options that greatly speed up the startup time of factorio:

cache-prototype-data=true
cache-sprite-atlas-count=1
cache-sprite-atlas=true

Caching prototypes is marked experimental. The other two have no comment. I'm guessing that the cache-sprite-atlas-count is the number of old altases it keeps around so switching between 2 sets of mods will still have a cached atlas. And the default of 1 only keeps the current atlas.

Turning those options on has a huge impact on the startup time. Without caches:
...
0.225 [Audio] Backend:default; Depth:16, Channel:2, Frequency:44100; MixerQuality:linear
0.340 Data stage cache not used.
...
26.768 Prototype list checksum: 3457637422
27.359 Data stage cached in: 0.573571 seconds.
27.725 Loading sounds...
27.798 Info PlayerData.cpp:71: Local player-data.json available, timestamp 1635804730
27.799 Info PlayerData.cpp:78: Cloud player-data.json unavailable
28.048 Crop bitmaps.
28.048 Atlases were not loaded from disk cache.
28.885 Parallel Sprite Loader initialized (threads: 7)
...
53.919 Sprites loaded
55.023 Sprite atlas cached.
...
55.874 Factorio initialised
And with caches:
...
0.222 [Audio] Backend:default; Depth:16, Channel:2, Frequency:44100; MixerQuality:linear
0.712 Data stage cache loaded in: 0.346025 seconds.
...
1.296 Prototype list checksum: 3457637422
1.360 Loading sounds...
1.412 Info PlayerData.cpp:71: Local player-data.json available, timestamp 1635804802
1.412 Info PlayerData.cpp:78: Cloud player-data.json unavailable
1.649 Initial atlas bitmap size is 4096
...
5.210 Atlases loaded from disk cache.
5.228 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
5.343 Parallel Sprite Loader initialized (threads: 7)
7.153 Sprites loaded
...
7.512 Custom mipmaps uploaded.
7.617 Generated mipmaps for virtual atlas of size 8192x16384
7.633 Custom inputs active: 54
7.822 Factorio initialised
From nearly 56 seconds to under 8, more than 7 times faster every time you start factorio. Seems well worth it for anyone playing with large mods.

Now I wonder why the first option is still marked experimental? Why can't they be activated from the GUI? And how are they ever going to get more player testing if they are hidden away in config.ini?

Is there something I should look out for when using those options? Something more to report if I see odd things like timestamps or checksums of some cached files?
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Why can't data/atlas caching not be turned on from the GUI?

Post by Koub »

Actually, they're kind of accessible via a GUI, but ... a hidden one :
2021-11-02 07_40_55-Factorio 1.1.45.jpg
2021-11-02 07_40_55-Factorio 1.1.45.jpg (30.78 KiB) Viewed 2392 times
In the main menu, instead of clicking on Settings, click on [Ctrl]+[Alt]+[Settings], you'll have a new "The rest" submenu.

I guess the reason they're not accessible is because they may cause issues.
Koub - Please consider English is not my native language.
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Why can't data/atlas caching not be turned on from the GUI?

Post by mrvn »

Can you elaborate a bit more on that?

Can I expect to get wrong prototype data because the cache not always detects then a mod has changed?
Some graphics not getting updated because the cache doesn't notice if a graphics file changes?

Or does the game become unstable?
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3717
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Why can't data/atlas caching not be turned on from the GUI?

Post by DaveMcW »

https://www.factorio.com/blog/post/fff-326 wrote:
The setting is still disabled by default because it's highly experimental, but if it ends up stable enough, we might turn it on by default.
Maybe ask Rseding if it's stable enough after 2 years.
Post Reply

Return to “Technical Help”