[ 
https://issues.apache.org/jira/browse/LOG4J2-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652686#comment-16652686
 ] 

ASF GitHub Bot commented on LOG4J2-2475:
----------------------------------------

Github user cakofony commented on the issue:

    https://github.com/apache/logging-log4j2/pull/220
  
    I think cloning large arrays will mitigate any advantages of using 
ReusableParameterizedMessage over ParameterizedMessage.
    
    If we use ParameterizedMessage for large parameter arrays, we can also 
simplify ReusableParameterizedMessage to remove the `varargs` field, and make 
the code easier to read.
    This also solves the issue illustrated by my earlier commit where large 
arrays are referenced by 
ReusableParameterizedMessage/MutableLogEvent/RingBufferLogEvent until another 
logger is called with a parameter array.


> Limit reusable event.clear parameter clearing to argsCount
> ----------------------------------------------------------
>
>                 Key: LOG4J2-2475
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2475
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Carter Kozak
>            Assignee: Carter Kozak
>            Priority: Major
>
> Larger parameter arrays may make their way into log4j when passed into the 
> logger directly. These may take longer to clear, despite only containing one 
> or two parameters.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to