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

Remko Popma closed LOG4J2-772.
------------------------------
       Resolution: Resolved
         Assignee: Remko Popma
    Fix Version/s: 2.6

ParameterizedMessage has been optimized as part of the work done for 
LOG4J2-1271.

> Performance enhancement: ParameterizedMessage should not take String 
> snapshots of its parameters in constructor
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-772
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-772
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 2.0, 2.0.1
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>              Labels: Performance
>             Fix For: 2.6
>
>
> Discovered during investigation for LOG4J2-763, {{ParameterizedMessage}} 
> currently initializes its {{String[] stringArgs}} field in the constructor. 
> This may be wasted work if the message is not used, for example because the 
> log level is below the filter threshold.
> The {{stringArgs}} field should be initialized in the {{getFormattedString}} 
> method, not earlier.



--
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