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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0
    • Utilities
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: