-
Notifications
You must be signed in to change notification settings - Fork 28
Using JavaFileObject.openOutputStream is very slow #233
Copy link
Copy link
Open
Description
transfuse/transfuse-core/src/main/java/org/androidtransfuse/gen/FilerSourceCodeWriter.java
Line 53 in a8ee2e9
| OutputStream os = sourceFile.openOutputStream(); |
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels