"Write to text file" performance

The "write to text file" action seems to perform very badly in "append" mode on large files, almost as if it's reading the entire file in before writing any output. This means that any build which continually writes output to a text file will get slower and slower - the action takes milliseconds on an empty file, but 4 seconds on a 20 megabyte file. That means a build which writes say 10 times to that logfile per cycle in the build is going to be spending 95% of its time just on the logging!

Is there a faster way to write (in append mode) to a text file? Or maybe there's some workaround?

As a test, I replaced the write step by two steps: write to a text file, then spawn a dos shell to "type foo.txt >>bar.txt" - this is actually much faster, taking .5s (rather than 3-4 seconds). That seems really strange.

Slightly faster is replacing both lines with a single DOS command: echo "the text I want to write" >> bar.txt

Is there a better way?

Steve

Hi Steve

We should have a fix for this tomorrow, Angus did some work on this today and got a big improvement on performance, will need a bit more testing tomorrow before we roll the change into a build.


Awesome!

Steve

Hi Steve,

This test build should give vastly better performance:

https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_420.exe

Regards,

Angus