Remko Popma created LOG4J2-772:
----------------------------------

             Summary: 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.1, 2.0
            Reporter: Remko Popma


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.2#6252)

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

Reply via email to