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

Ralph Goers commented on LOG4J2-2795:
-------------------------------------

One other thing I should note. Due to the way the JVM works I would expect much 
of the code executed during startup to be considerably slower than it would be 
if the JVM had been running for a while as code is typically not optimized 
until it has been executed quite a few times. That is one reason why when 
running benchmarks it is usually recommended to run many warmup iterations 
before actually starting to capture statistics. It would also explain to some 
degree why getting 100 Loggers is somehow faster in two of the tests than 
getting a single Logger. 

> Make LogManager/LoggerContext creation time reasonable
> ------------------------------------------------------
>
>                 Key: LOG4J2-2795
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2795
>             Project: Log4j 2
>          Issue Type: Task
>          Components: Core
>    Affects Versions: 2.13.0
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>         Attachments: log4j2.png
>
>
> Currently (2.13), LogManager.getLogger("xxx") takes ~600ms on a cold JVM by 
> itself.
> For a logging framework it is likely way too much (by comparison a CDI test 
> with classpath scanning takes ~50ms).
>  
> This ticket is about trying to be faster (maybe by removing java 
> serialization usage and reducing registry usage + reflection of plugins by 
> generating java code?).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to