Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9461

CLONE - To use ByteArrayOutput/InputStream without synchronization

Details

    • Wish
    • Status: Resolved
    • P3
    • Resolution: Abandoned
    • None
    • Not applicable
    • sdk-java-core

    Description

      It would be nice to see Beam using custom ByteArrayInput/OutputStream without synchronization. It currently uses `ThreadLocal`, so using thread-safe stream seems unnecessary. And all streams should never be access by more than 1 thread from the start anyway.

      Simply getting rid of the synchronized keyword will speed up about ~500 times for single byte access. Something like org.apache.beam.sdk.util.VarInt will get significant benefit from it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lukemin89 Kyoungha Min
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: