Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1575

(GC) Store Configuration Properties in List instead of Map to prevent creating temporary iterators

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7
    • Lookups
    • None

    Description

      Currently the Configuration stores Property values in a Map, where the key is the Property, and the value is a Boolean specifying whether the value contains a "${", meaning it requires a string substitution.

      This is not a problem in itself, but if the configuration contains properties, the Map is iterated over for each event, creating a number of temporary objects.

      I propose to store the boolean value in the Property class itself (to be initialized in the constructor). This allows the Configuration to store Property values in an immutable List, which can be iterated over without creating temporary objects.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment