This bug is submitted as a reminder to re-visit the transferTo/transferFrom implementation to make sure that the best strategy is used for all platforms.
In particular:
1. On Solaris then sendfile is used when the target is a FileChannelImpl and we should re-verify that this is indeed better than implementing it in user-space for various transfer sizes.
2. On Windows then memory mapped files may not be the same win that it is on Solaris/Linux and we should check if it would be faster to use simple read/write.
3. On Solaris/Linux then it may be faster to use simple read/write when the transfer size is small. Solaris cp(1) for example only uses memory mapping then the file is larger than 32k.
In particular:
1. On Solaris then sendfile is used when the target is a FileChannelImpl and we should re-verify that this is indeed better than implementing it in user-space for various transfer sizes.
2. On Windows then memory mapped files may not be the same win that it is on Solaris/Linux and we should check if it would be faster to use simple read/write.
3. On Solaris/Linux then it may be faster to use simple read/write when the transfer size is small. Solaris cp(1) for example only uses memory mapping then the file is larger than 32k.
- relates to
-
JDK-6980847 (fs) Files.copy needs to be "tuned"
- Resolved
There are no Sub-Tasks for this issue.