On Tue, 16 Mar 2021 05:23:31 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> > I think we should consider alternative routes of improving performance. For 
> > instance, could NIO both speed up I/O and simplify code?
> 
> I don't understand the NIO comment. Under the covers, JavaFileManager uses 
> NIO and has for some time.

Indeed, `JavacFileManager` and friends seem to already use NIO in some places. 
Perhaps we could improve those parts of JavaDoc that copy files in read-write 
loops: `DocFile.copyFile(...)` and `DocFile.copyResource(...)`. When no 
transformation is required, files can be copied using bigger NIO blocks such as 
`java.nio.file.Files.copy(...)`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2665

Reply via email to