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

Reduce memory allocations in InMemoryTimerInternals

Details

    • Task
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.30.0
    • sdk-java-core
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: