[jira] [Created] (IO-597) FileUtils.iterateFiles goes out of memory when executed for a directory with large number of files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IO-597) FileUtils.iterateFiles goes out of memory when executed for a directory with large number of files

JIRA jira@apache.org
Arvind created IO-597:
-------------------------

             Summary: FileUtils.iterateFiles goes out of memory when executed for a directory with large number of files
                 Key: IO-597
                 URL: https://issues.apache.org/jira/browse/IO-597
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
            Reporter: Arvind


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)