[ 
https://issues.apache.org/jira/browse/LOG4J2-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Remko Popma updated LOG4J2-1575:
--------------------------------
    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. 

  was:
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 huge problem, 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. 


> (GC) Store Configuration Properties in List instead of Map to prevent 
> creating temporary iterators
> --------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1575
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1575
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Lookups
>    Affects Versions: 2.6.2
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.7
>
>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to