This method returns an output stream that writes each byte individually, which makes builds very slow. This Javac bug exists all the way up to JDK 15. The FilerOutputStream extends FilterOutputStream without overriding the write(byte[], offset, length) method. I've opened a JDK bug.
In the meantime you can use JavaFileObject.openWriter instead, which does not have this performance problem. You can adapt it back to OutputStream using org.apache.commons.io.output.WriterOutputStream
https://github.com/johncarl81/transfuse/blob/a8ee2e9b7263f4c88d93f0f85113a5e99b2a9011/transfuse-core/src/main/java/org/androidtransfuse/gen/FilerSourceCodeWriter.java#L53
This method returns an output stream that writes each byte individually, which makes builds very slow. This Javac bug exists all the way up to JDK 15. The FilerOutputStream extends
FilterOutputStream
without overriding thewrite(byte[], offset, length)
method. I've opened a JDK bug.In the meantime you can use
JavaFileObject.openWriter
instead, which does not have this performance problem. You can adapt it back toOutputStream
usingorg.apache.commons.io.output.WriterOutputStream