I think its 3 steps, first strf, then copying the string to a large byte array and in the exitrun, save the array to a file.

Its the file saving that is slow.