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

Reduce memory allocations in InMemoryTimerInternals

    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

      Doing some profiling, there are a lot of unnecessary allocations occurring in InmemoryTimerInternals:

      1) Every WindowTracing.trace call calls getClass().getSimpleName() which searches the class name for a "." and then creates a substring which is then discarded if tracing is not on. This can be cached easily.

      2) In setTimer, the column key (timerData.getTimerId() + '+' + timerData.getTimerFamilyId()) is computed twice each time which involves string builders, appends, etc...

        Attachments

          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: