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

Reduce ArrayList allocation in Row/RowUtils

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.30.0
    • Component/s: sdk-java-core
    • Labels:
      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

              • Assignee:
                dkulp Daniel Kulp
                Reporter:
                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