Page 1 of 1

add non-blocking autosave to windowsby copying wsl's fork

Posted: Mon May 12, 2025 9:31 am
by ilikehackinggames
the main reson ive seen for it not being on windows is the lack of fork with cow. well thats not quite true. wsl (windows subsystem for linux) has full support for cow fork(). i beleave it works by creating a new prosess and remaping the memory with cow protectsons as well as copying all handles for files and things. it would have slightly more overhead then on linux but likely only a few miliseconds at most. and given that saving takes way longer (mostly for compreson i assume) i feel like a few miliseconds of overhead is better then a few seconds-a few minites of blocking save time. (also sorry if this isnt where i should put this i cant find a good place)

Re: add non-blocking autosave to windowsby copying wsl's fork

Posted: Wed May 14, 2025 1:43 pm
by DaveMcW
Have you tried installing the Linux version of Factorio in WSL?

https://learn.microsoft.com/en-us/windo ... s/gui-apps

Re: add non-blocking autosave to windowsby copying wsl's fork

Posted: Wed May 14, 2025 1:47 pm
by eugenekay
Processes created under Win32 user space cannot “fork()” into becoming a WSL process…. It has to start there to begin with. :-)

You can run a Headless Server on a Linux machine, with non-blocking saving enabled, and then connect to it from your Windows Desktop in Multiplayer mode. If the two computers are on the same LAN Network you will not have any noticeable Input Lag. I use this method myself, since I have multiple Desktop/Laptops spread around my house.

Good Luck!

Re: add non-blocking autosave to windowsby copying wsl's fork

Posted: Sun May 18, 2025 1:43 am
by ilikehackinggames
eugenekay wrote: Wed May 14, 2025 1:47 pm Processes created under Win32 user space cannot “fork()” into becoming a WSL process…. It has to start there to begin with. :-)

You can run a Headless Server on a Linux machine, with non-blocking saving enabled, and then connect to it from your Windows Desktop in Multiplayer mode. If the two computers are on the same LAN Network you will not have any noticeable Input Lag. I use this method myself, since I have multiple Desktop/Laptops spread around my house.

Good Luck!
not what i was sugesting. what i was sugesting was implimenting it yourself based on wsl's fork implimintatson. i know you cant just magicly become a WSL process.

Re: add non-blocking autosave to windowsby copying wsl's fork

Posted: Sun May 18, 2025 1:44 am
by ilikehackinggames
DaveMcW wrote: Wed May 14, 2025 1:43 pm Have you tried installing the Linux version of Factorio in WSL?

https://learn.microsoft.com/en-us/windo ... s/gui-apps
no but the main issue is i dont want the overhead of everything else. i only want the saving.

Re: add non-blocking autosave to windowsby copying wsl's fork

Posted: Sun May 18, 2025 1:44 am
by ilikehackinggames
eugenekay wrote: Wed May 14, 2025 1:47 pm Processes created under Win32 user space cannot “fork()” into becoming a WSL process…. It has to start there to begin with. :-)

You can run a Headless Server on a Linux machine, with non-blocking saving enabled, and then connect to it from your Windows Desktop in Multiplayer mode. If the two computers are on the same LAN Network you will not have any noticeable Input Lag. I use this method myself, since I have multiple Desktop/Laptops spread around my house.

Good Luck!
also i dont have a second computer lol