[
https://issues.apache.org/jira/browse/LOG4J2-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406945#comment-17406945
]
Volkan Yazici commented on LOG4J2-3153:
---------------------------------------
[~ckozak], have you seen
{{org.apache.logging.log4j.layout.template.json.util.InstantFormatter}},
particularly its {{Formatter#isInstantMatching}} methods used for invalidating
the cache? I was thinking of making it even smarter, e.g., if the pattern only
has seconds, compare {{Instants}} by their seconds.
> FixedDateFormat performs poorly with a PreciseClock
> ---------------------------------------------------
>
> Key: LOG4J2-3153
> URL: https://issues.apache.org/jira/browse/LOG4J2-3153
> Project: Log4j 2
> Issue Type: Bug
> Components: Layouts
> Affects Versions: 2.14.1
> Reporter: Carter Kozak
> Assignee: Carter Kozak
> Priority: Major
> Fix For: 2.15.0
>
>
> Enabling a PreciseClock with microsecond precision (default on jdk9+) results
> in substantially worse performance in DatePatternConverter using a
> FixedDateFormat which doesn't rely on microsecond precision.
> The cached value is invalidated every time the microsecond clock changes.
> This is correct when the clock uses microsecond precision, however many
> configurations (including the default) use only millisecond precision, so we
> can reuse the cached value many times longer.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)