Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4787

reduce plugin memory footprint by avoiding creation of unnecessary collections

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0, 2.5.0
    • plugins
    • None

    Description

      Model package classes like RangerPolicy initialize collection members with a new collection object (ArrayList/HashMap/HashSet). Many of these members would likely remain empty, resulting in the initialization to be unnecessary. Instead of creating a new collection object, it will help to initialize with Collections.emptyList()/emptySet()/emptyMap() - to save memory while retaining non-null value for collection members.

      Also, set() on these members currently create a new collection object with a copy of the value to be set. This can be avoided by using the given value.

      Attachments

        Issue Links

          Activity

            People

              madhan Madhan Neethiraj
              madhan Madhan Neethiraj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: