As discussed, here is a new job for you: Please find attached a class called TFastIniFile with a test program. The test program runs identical set of data against TIniFile, TFastIniFile and a 3rd party control called TBigIniFile.
TFastIniFile is custom made by me, with speed in mind. Therefore, it's naturally memory mapped and data is saved to file only when SaveToFile (or Flush) is called. The same applies to TBigIniFile.
Your job is to improve the TFastIniFile's SaveToFile function in a way it can be run in a thread. Add a parameter CanBeDelayed : Boolean = True to the function, similar to what I already did to the Flush function. If it's true, then save the data to disk in a thread.
Also included is TFastIniFileEx which is a control based on TFastIniFile which adds support for compression and encryption. Apply the threaded save to this control as well.
I'm suspecting that there is a bug or bugs in TFastIniFile since the test program results in outputfiles that are very different it size. They should have almost identical size, at least between TFastIniFile and TBigIniFile. Can you find and fix the bug(s)?