EDIFileSplitter – Setting Read/Write Buffers


    Setting Read/Write Buffers

    EDIFileSplitter is a high-speed multi-threaded X12 EDI File splitter. It reads and writes data concurrently. This means that strings only stay in memory for a short time reducing overall memory load in applications. This also has the added benefit of being able to split larger EDI files. EDIFileSplitter does not read the entire source EDI file at once. By default EDIFileSplitter reads data 4096 bytes at a time. This reduces total IO operations and increase the speed of the overall splitting process. EDIFileSplitter also does not write to the output EDI files one line at a time. By default it uses a buffer of 4096 bytes. When the buffer is full it then writes the data to the output EDI files. This again reduces the total IO operations. These default settings can be changed to suit specific scenarios.


    EDIFileSplitter splitter = new EDIFileSplitter();
    splitter.ReadBlockSize = 5012;
    splitter.WriteBlockBuffer = 5012;

    in EDI File Splitter
    Did this article answer your question?