Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-329

FileUtils.writeLines uses unbuffered IO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.4
    • Streams/Writers
    • None

    Description

      FileUtils.writeLines looks like next:

      out = openOutputStream(file, append);
      IOUtils.writeLines(lines, lineEnding, out, encoding);

      openOutputStream opens plain FileOutputStream without any buffering and IOUtils.writeLines does not add abyt buffering. This means each line require 2 write syscalls (one for the line and one for line separator). This makes call very slow, especially for short lines

      Attachments

        Activity

          People

            Unassigned Unassigned
            tivv Vitalii Tymchyshyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: