Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-1331

Optimize Snapshot class constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.13.0
    • None
    • None

    Description

      In some of our workloads (where we need to gather samza metrics five times per minute) `SlidingTimeWindowReservoir.getSnapshot()` method takes up to 10% of processor time.

      Almost all of `getSnapshot` time is taken by Collections.sort method. So, the complexity of Snapshot constructor is O(NlogN) + iteration through passed values.

      This ticket asks to improve the performance of Snapshot constructor but keep the performance of all other methods at least on the same level.

      Attachments

        Issue Links

          Activity

            People

              logarithm Maxim Logvinenko
              logarithm Maxim Logvinenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: