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

FileUtils.iterateFiles goes out of memory when executed for a directory with large number of files

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: Utilities
    • Labels:
      None

      Description

      FileUtils.iterateFiles goes out of memory when executed for a directory with large number of files because it uses the listFiles method which returns an array of java.io.File objects. The iterator itself should not be derived from a list but from a Java Stream which will have lesser memory footprint. This feature however can be used only with Java 8 or later because streams were introduced only in Java 8.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              arvindvenu Arvind
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: