(fs) Files.copy(Path,Path,CopyOption...) should use sendfile on Linux

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: core-libs
    • b19
    • linux

      On Unix the copy is implemented in sun.nio.fs.UnixCopyFile.copy() which calls a native method transfer(int,int,long) to perform the actual data copying. The copy is effected via a user-space buffer in a loop of read()-write() invocations. Instead of going via user-space buffers, the copy should be able to be done more efficiently using zero-copy as implemented by the Linux system call sendfile().

            Assignee:
            Brian Burkhalter
            Reporter:
            Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: