I have noticed a huge performance hit in one of my projects when logging is enabled for the first time. But when the log file limit is reached and the program starts writing
You can use the SetFileValidData function to extend the logical length of a file without having to write out all that data to disk. However, because it can allow to read disk data to which you may not otherwise have been privileged, it requires the SE_MANAGE_VOLUME_NAME
privilege to use. Carefully read the Remarks section of the documentation.
Also implementation of SetFileValidData depend on fs driver. NTFS support it and FAT only since Win7.