Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255729

com.sun.tools.javac.processing.JavacFiler.FilerOutputStream is inefficient

XMLWordPrintable

    • b04
    • generic
    • generic
    • Not verified

        ADDITIONAL SYSTEM INFORMATION :
        Java 8 all the way up to 15

        A DESCRIPTION OF THE PROBLEM :
        FilerOutputStream, which can be used by annotation processors to write source files, extends from FilterOutputStream without overwriting the write(byte[], offset, length) method. This means that content written to this stream is written to disk one byte at a time, greatly slowing down builds.


        CUSTOMER SUBMITTED WORKAROUND :
        Use JavaFileObject.openWriter instead, which does not suffer from this performance problem.

        FREQUENCY : always


              jjg Jonathan Gibbons
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: