Configuration
Configuration
There are several configurable options which are all loaded from the {game}/x64/modules/config/ff12-lua-loader.ini
file when opening the game.
This configuration file can be modified via any text editor. The following configuration is the default:
If no config is present, default values are used.
Below is a list of all configurable options and what they are used for:
Files
Max Directories Per Period
The maximum number of directories the file change handler will check per scan period when using directory-based monitoring with ReadDirectoryChangesW
(RDCW).
Max Files Per Period
Sets the maximum number of individual files the file change handler will check per scan period when using file-based monitoring by polling.
Even though fast storage devices like SSDs can handle tens of thousands of file checks per second without I/O issues, the CPU usage goes up significantly at higher rates. On slower drives like HDDs, a lower value may be necessary to avoid excessive overhead.
The value should be balanced between responsiveness and performance.
Check Period
Defines the time period, in milliseconds, over which checks are distributed by the file change handler. It is not a fixed interval, but rather controls how many checks occur within that period based on configured limits.
Checks are spread roughly evenly across the period. For example, with 10 files and a 100 ms period, each is checked about every 10 ms. If the number of checks exceeds the maximum allowed per period, the excess is carried over to the next cycle, increasing the average interval between checks. Even when the number of checks does not exceed the maximum, the handler still distributes the workload across time to avoid large processing spikes.
The check order is randomized each cycle for fairness, and the Minimum Check Interval argument is also considered when scheduling checks.
A shorter period means the system checks for changes more frequently, improving responsiveness. However, this can increase CPU usage, especially when many files or directories are involved.
For example, changing checkPeriod = 1000
and maxFilesPerPeriod = 3000
to checkPeriod = 100
andmaxFilesPerPeriod = 300
results in more frequent scans with smaller workloads.
This makes the detection of file changes more responsive at the cost of slightly higher CPU usage, since the thread wakes and processes files more often.
Last updated