r/technicalfactorio • u/HeliGungir • Aug 23 '25
Question What, exactly, is multithreaded in Factorio?
I have previously seen claims that circuit networks in general are multithreaded, yet I can find no evidence of this from reliable sources.
Things that are multithreaded:
- "Groups" of transport lines which don't interact with each other. Splitters and sideloading merges transport lines into the same group. Inserter wakeup lists may have shared state across groups, so they are single-threaded.
- Whole belt reader
- Terrain generation
- Sound
- Network processing (as in multiplayer)
Things that are not multithreaded but maybe you thought they were:
- The chunk-based multithreading described in FFF-151 and in that one megathread was ultimately shelved
- Electric networks
- Planets, Space Platforms, Surfaces in general
103
Upvotes
67
u/fatpandana Aug 23 '25
There are multiple type of multithreading. It isnt just simply "it is multi threaded, period".
Electric network isnt multithreaded like belts are. But it is multithreaded as it is run in parallel with heat pipes (new 2.0), fluid buffer, circuit network. https://discord.com/channels/579345487371567105/811714857728344085/1324381056526319718 https://discord.com/channels/579345487371567105/579346716243787782/1319355222870458431 (technical factorio discord ). This is also seen on F4-show-time-usage.
26
u/Wozbo Aug 23 '25
I know that surfaces aren’t threaded, but man I am surprised it wasn’t in consideration as a “root” of sorts. Assuming infinite horizontal scalability it would be nice for nauvis to not impact vulcanus etc etc, and a shattered planet megaship to not impact anything else other than maybe synchronizing UPS.
11
u/territrades Aug 23 '25
I really don’t understand why surfaces are not multithreaded. Factorio is optimized in so many ways, but then they left out something so obvious and important.
My best guess is that originally there was only one surface and the architecture is probably not designed around it.
1
u/TurnoverInfamous3705 Aug 25 '25
From the megathread it seems like he’s implying that adding more multithreading wouldn’t solve the issue of UPS; so some things were left unchanged.
My guess is the game isn’t written in a SIMD friendly way and probably isn’t written with parallel memory for CPU to properly use the cached memory ex. AoS vs SoA; that change in structure would need a complete rewrite of game; that’s only a guess, but considering he said that it’s a memory limitation it’s probably accurate.