Setting File Buffer Size For Performance
Generating EDI files can consume a lot of memory and effect performance. One way to improve the speed when generating EDI files is to specify an approximate length (in terms of the amount of characters). The internal buffers will not need to recreate itself with more space. By default the FileBufferSize is set to 2000 characters. This number should be changed if you plan to generate an EDI file larger than 2000 characters (which is most likely the case).