It was noted that modding will be the lifeblood of factorio after 1.0.
Given that, and seeing the trend for cpus is more cores, we may have to rely on Mods for performance bumps. Clusterio gave us mutlithreading, but that involves seperate instaces of factorio running. Itd be really cool if surfaces ran on seperate threads, for future modders to abuse for performance. Maybe even allow the threads to be out of sync tick wise.
Are layers seperately threaded?
-
- Fast Inserter
- Posts: 109
- Joined: Sat Apr 29, 2017 11:13 pm
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Are layers seperately threaded?
I've had a totally absurd idea once involving several surface that run at different speeds. But that can never work if in an MP game there are players on both surfaces.FrodoOf9Fingers wrote: ↑Tue Oct 08, 2019 6:21 pm Maybe even allow the threads to be out of sync tick wise.
Mods can already make actions on one surface affect other surfaces (factorissimo) so you can't really treat them seperately without limiting what mods can do.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Are layers seperately threaded?
The single-thread design is only one of the bottlenecks. RAM latency is another one, sometimes even the primary bottleneck.
If you solve multithreading, you will still be stuck on RAM latency.
If you solve multithreading, you will still be stuck on RAM latency.
Re: Are layers seperately threaded?
It's a wonderfully complex problem but not an impossible one.
I'm curious if it's possible to identify and define distinct blocks of area and put each area on its own thread. For example, train pathing probably doesn't need to be on the same thread as inserters deciding to take items.
I'm curious if it's possible to identify and define distinct blocks of area and put each area on its own thread. For example, train pathing probably doesn't need to be on the same thread as inserters deciding to take items.
-
- Fast Inserter
- Posts: 109
- Joined: Sat Apr 29, 2017 11:13 pm
- Contact:
Re: Are layers seperately threaded?
This is within a surface. I'm not going to contest having only a single thread per surface, because there are tons of dependencies within a surface. Id like to see one thread per surface.Cribbit wrote: ↑Tue Oct 08, 2019 7:15 pm It's a wonderfully complex problem but not an impossible one.
I'm curious if it's possible to identify and define distinct blocks of area and put each area on its own thread. For example, train pathing probably doesn't need to be on the same thread as inserters deciding to take items.
Re: Are layers seperately threaded?
Different surfaces still have the same problem with threading as anything else
The main thing I see, is that scripts can access any surface. So when an entity dies, a script could add/remove other things from other surfaces
The main thing I see, is that scripts can access any surface. So when an entity dies, a script could add/remove other things from other surfaces
-
- Fast Inserter
- Posts: 109
- Joined: Sat Apr 29, 2017 11:13 pm
- Contact:
Re: Are layers seperately threaded?
The hope is that hardware will improve. Memory overclocking is becoming more widespread, and there are sure to be other ways to increase the speed with new chipset designs.DaveMcW wrote: ↑Tue Oct 08, 2019 6:48 pm The single-thread design is only one of the bottlenecks. RAM latency is another one, sometimes even the primary bottleneck.
If you solve multithreading, you will still be stuck on RAM latency.
I'm planning for better hardware, and hoping factorio will be able to use it, even if it's not all used on a single surface.
-
- Fast Inserter
- Posts: 109
- Joined: Sat Apr 29, 2017 11:13 pm
- Contact:
Re: Are layers seperately threaded?
Thats true. Putting multi threaded programming concerns on mod devs would be... Fun?