giraph icon indicating copy to clipboard operation
giraph copied to clipboard

Prefers OutputStream instead of FileOutputStream to improve performance.

Open reudismam opened this issue 6 years ago • 2 comments

reudismam avatar Aug 23 '18 00:08 reudismam

Can you comment on how this improves performance?

dlogothetis avatar Aug 24 '18 21:08 dlogothetis

FileInputStream and FileOutputStream override the finalize method. As a result, their objects are only cleaned when the garbage collector performs a sweep. Since Java 7, programmers can use Files.newInputStream and Files.newOutputStream instead of FileInputStream and FileOutputStream to improve performance. finalize method is deprecated in Java 9+.

reudismam avatar Oct 08 '18 17:10 reudismam