[
https://issues.apache.org/jira/browse/LOG4J2-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652549#comment-16652549
]
ASF GitHub Bot commented on LOG4J2-2475:
----------------------------------------
Github user remkop commented on the issue:
https://github.com/apache/logging-log4j2/pull/218
That was fast, thank you Carter!
It looks to me that the difference is just a handful of nanoseconds to null
out a 1000-element array.
I would expect the ringbuffer to contain mostly small arrays and an
occasional large array, and only those large arrays would then take an extra
few nanos to null out.
I do believe that it is more robust to null out the whole array. This
allows future contributors who are perhaps less familiar with the code to make
changes without breaking things.
> 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)