You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/07/11 07:10:11 UTC

[jira] [Closed] (LOG4J2-772) Performance enhancement: ParameterizedMessage should not take String snapshots of its parameters in constructor

     [ 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org