Details
-
Enhancement
-
Resolution: Done
-
Major
-
fuse-7.10-GA
-
None
-
False
-
None
-
False
-
Release Notes
-
Medium
-
%
-
?
-
Todo
-
Release Note
Description
In Camel File component, the FileConsumer.pollDirectory() call several methods that are java.ioFile.*
java.io.File.length()
java.io.File.lastModified()
java.io.File.isDirectory()
and another
java.io.File.isDirectory()
Probably java.io.File is inefficient. Java 7's java.nio.file package with Files.newDirectoryStream() is much more efficient and should be used these days.
https://www.rgagnon.com/javadetails/java-get-directory-content-faster-with-many-files.html
found a factor of 460x performance improvement on large directories with java.nio.file vs java.io.File.
Is there a good reason why we don't use java.nio.file.* to improve performance?
Attachments
Issue Links
- links to