logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-1341) (GC) Avoid allocating temporary objects in Pattern Converters for PatternLayout
Date Sun, 20 Nov 2016 17:01:58 GMT

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

Remko Popma updated LOG4J2-1341:
--------------------------------
    Description: 
*To do*
The following pattern converters can be modified to avoid creating temporary objects in their
{{format}} method:
* EncodingPatternConverter

*Investigate*
The following pattern converters may be difficult to modify since they rely on JDK components
that create temporary objects:
* (-) ExtendedThrowablePatternConverter
* (-) RegexReplacementConverter
* (-) RootThrowablePatternConverter
* (-) ThrowablePatternConverter
* (-) UuidPatternConverter
* (-) VariablesNotEmptyReplacementConverter
* (-) ClassNamePatternConverter (location information requires creating StackTraceElements)
* (-) FileLocationPatternConverter
* (-) FullLocationPatternConverter
* (-) LineLocationPatternConverter
* (-) MethodLocationPatternConverter

*Done*
The following pattern converters already do not allocate temporary objects in their format
method:
* (/) AbstractStyleNameConverter (since 2.8)
* (/) HighlightConverter (since 2.7, thanks to Richard Zschech)
* (/) StyleConverter (since 2.7, thanks to Richard Zschech)
* (/) DatePatternConverter
* (/) EqualsIgnoreCaseReplacementConverter (since 2.8)
* (/) EqualsReplacementConverter (since 2.8)
* (/) IntegerPatternConverter (since 2.8)
* (/) LevelPatternConverter
* (/) LineSeparatorPatternConverter
* (/) LiteralPatternConverter (unless literal contains '${')
* (/) LoggerPatternConverter
* (/) MapPatternConverter (since 2.8 - note that constructing a MapMessage is not garbage-free)
* (/) MarkerPatternConverter (since 2.8)
* (/) MarkerSimpleNamePatternConverter
* (/) MaxLengthConverter (since 2.8)
* (/) MdcPatternConverter (since 2.7)
* (/) MessagePatternConverter (unless a Jansi or HTML renderer is configured or message has
'${' lookups)
* (/) NamePatternConverter
* (/) NanoTimePatternConverter
* (/) NdcPatternConverter (since 2.8 ContextStack implementations implement the StringBuilderFormattable
interface - note that the ThreadContext stack is cloned for each log event and is not garbage-free)
* (/) RelativeTimePatternConverter (since 2.8)
* (/) SequenceNumberPatternConverter (since 2.8)
* (/) ThreadIdPatternConverter
* (/) ThreadNamePatternConverter
* (/) ThreadPriorityPatternConverter


  was:
*To do*
The following pattern converters can be modified to avoid creating temporary objects in their
{{format}} method:
* EncodingPatternConverter
* MapPatternConverter (replace MapMessage internal SortedMap JDK data structure with StringMap)

*Investigate*
The following pattern converters may be difficult to modify since they rely on JDK components
that create temporary objects:
* (-) ExtendedThrowablePatternConverter
* (-) RegexReplacementConverter
* (-) RootThrowablePatternConverter
* (-) ThrowablePatternConverter
* (-) UuidPatternConverter
* (-) VariablesNotEmptyReplacementConverter
* (-) ClassNamePatternConverter (location information requires creating StackTraceElements)
* (-) FileLocationPatternConverter
* (-) FullLocationPatternConverter
* (-) LineLocationPatternConverter
* (-) MethodLocationPatternConverter

*Done*
The following pattern converters already do not allocate temporary objects in their format
method:
* (/) AbstractStyleNameConverter (since 2.8)
* (/) HighlightConverter (since 2.7, thanks to Richard Zschech)
* (/) StyleConverter (since 2.7, thanks to Richard Zschech)
* (/) DatePatternConverter
* (/) EqualsIgnoreCaseReplacementConverter (since 2.8)
* (/) EqualsReplacementConverter (since 2.8)
* (/) IntegerPatternConverter (since 2.8)
* (/) LevelPatternConverter
* (/) LineSeparatorPatternConverter
* (/) LiteralPatternConverter (unless literal contains '${')
* (/) LoggerPatternConverter
* (/) MarkerPatternConverter (since 2.8)
* (/) MarkerSimpleNamePatternConverter
* (/) MaxLengthConverter (since 2.8)
* (/) MdcPatternConverter (since 2.7)
* (/) MessagePatternConverter (unless a Jansi or HTML renderer is configured or message has
'${' lookups)
* (/) NamePatternConverter
* (/) NanoTimePatternConverter
* (/) NdcPatternConverter (since 2.8 ContextStack implementations implement the StringBuilderFormattable
interface - note that the ThreadContext stack is cloned for each log event and is not garbage-free)
* (/) RelativeTimePatternConverter (since 2.8)
* (/) SequenceNumberPatternConverter (since 2.8)
* (/) ThreadIdPatternConverter
* (/) ThreadNamePatternConverter
* (/) ThreadPriorityPatternConverter



> (GC) Avoid allocating temporary objects in Pattern Converters for PatternLayout
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1341
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1341
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Pattern Converters
>    Affects Versions: 2.5
>            Reporter: Remko Popma
>             Fix For: 2.8
>
>
> *To do*
> The following pattern converters can be modified to avoid creating temporary objects
in their {{format}} method:
> * EncodingPatternConverter
> *Investigate*
> The following pattern converters may be difficult to modify since they rely on JDK components
that create temporary objects:
> * (-) ExtendedThrowablePatternConverter
> * (-) RegexReplacementConverter
> * (-) RootThrowablePatternConverter
> * (-) ThrowablePatternConverter
> * (-) UuidPatternConverter
> * (-) VariablesNotEmptyReplacementConverter
> * (-) ClassNamePatternConverter (location information requires creating StackTraceElements)
> * (-) FileLocationPatternConverter
> * (-) FullLocationPatternConverter
> * (-) LineLocationPatternConverter
> * (-) MethodLocationPatternConverter
> *Done*
> The following pattern converters already do not allocate temporary objects in their format
method:
> * (/) AbstractStyleNameConverter (since 2.8)
> * (/) HighlightConverter (since 2.7, thanks to Richard Zschech)
> * (/) StyleConverter (since 2.7, thanks to Richard Zschech)
> * (/) DatePatternConverter
> * (/) EqualsIgnoreCaseReplacementConverter (since 2.8)
> * (/) EqualsReplacementConverter (since 2.8)
> * (/) IntegerPatternConverter (since 2.8)
> * (/) LevelPatternConverter
> * (/) LineSeparatorPatternConverter
> * (/) LiteralPatternConverter (unless literal contains '${')
> * (/) LoggerPatternConverter
> * (/) MapPatternConverter (since 2.8 - note that constructing a MapMessage is not garbage-free)
> * (/) MarkerPatternConverter (since 2.8)
> * (/) MarkerSimpleNamePatternConverter
> * (/) MaxLengthConverter (since 2.8)
> * (/) MdcPatternConverter (since 2.7)
> * (/) MessagePatternConverter (unless a Jansi or HTML renderer is configured or message
has '${' lookups)
> * (/) NamePatternConverter
> * (/) NanoTimePatternConverter
> * (/) NdcPatternConverter (since 2.8 ContextStack implementations implement the StringBuilderFormattable
interface - note that the ThreadContext stack is cloned for each log event and is not garbage-free)
> * (/) RelativeTimePatternConverter (since 2.8)
> * (/) SequenceNumberPatternConverter (since 2.8)
> * (/) ThreadIdPatternConverter
> * (/) ThreadNamePatternConverter
> * (/) ThreadPriorityPatternConverter



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


Mime
View raw message