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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      b04
    • CPU:
      generic
    • OS:
      generic

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: