FlightCore icon indicating copy to clipboard operation
FlightCore copied to clipboard

Temporary Directory Location

Open Jan200101 opened this issue 2 years ago • 2 comments

Mentioned in #458 Currently FlightCore creates a directory in the game installation to use as a temporary environment to work with.

This has little benefit at the moment but with #456 this would have the following benefits:

  • Installing Northstar into the game directory would take considerably less time because file moving is cheap.
  • (At least on linux) same fs file moves are atomic, meaning we would explicitly know when something could not be installed.
  • end-user is less likely to terminate any update process prematurely by exciting the program, since the processes that take the longest and act on files (e.g. extracting) would not interact with the game files.

A downside may be improper permissions, which would prevent us from creating or using a new directory, but that would also prevent us from installing NS.

The alternative would be using the system provided temporary directory which we would not have to manage and is often backed by ram.

Jan200101 avatar Jul 31 '23 21:07 Jan200101

It may even be best to consider mixing the two, downloading the ns or mod archives into the system temp dir and extracting them into a dir in the game folder, since the archive isn't useful beyond extraction, for which a ramfs would be faster.

Jan200101 avatar Jul 31 '23 21:07 Jan200101

Yeah, for downloading Northstar specifically I was planning to download it into RAM and then extract from there to slightly speed up the install process ^^

GeckoEidechse avatar Jul 31 '23 23:07 GeckoEidechse