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

Reduce ArrayList allocation in Row/RowUtils

Details

    • Task
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.30.0
    • sdk-java-core
    • None

    Description

      In Row.Builder.build, it currently creates a FieldOverrides object, then sets the overrides, and then will sometimes (if empty) discard everything it just did.

      This can be optimized a bit by:
      1) Only create the FieldOverrides if the values is not empty.

      2) Pass the values in to FieldOverrides constructor so that the appropriate ArrayList can be filled created and filled in immediately. The current setup will cause an empty ArrayList to be created in the constructor and then immediately discarded in the setOverride call.

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              dkulp Daniel Kulp
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m