Similar fix in Windows7 with Microsoft Security Essentials. I added a time-echo above the while-loop, and found it often was even slower to delete the existing speedwrite.txt than to write the 200 lines to it.

Once I added the write folder to Settings/Excluded-files-and-locations, the speed was much faster. At least in MSE, the change in write/delete speed is inherited into subfolders too.