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

Daniel Kulp resolved CXF-4602.
------------------------------

    Resolution: Fixed
    
> getL7dLogger improvements
> -------------------------
>
>                 Key: CXF-4602
>                 URL: https://issues.apache.org/jira/browse/CXF-4602
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.7.0
>            Reporter: Daniel Kulp
>            Assignee: Daniel Kulp
>             Fix For: 2.5.7, 2.6.4, 2.7.1
>
>
> After talking to Jeff Genender, I looked into the java.util.Logger code in 
> the JDK a little to see if there was a way to improve the CXF Logger creation 
> code a bit, particularly in OSGi.  Things I found:
> 1) Logger.getLogger is a synchronized method so minimizing the time spent in 
> there is good.
> 2) Setting the Thread contextClassLoader to the ClassLoader that loaded the 
> class prior to the call makes it faster to determine the classloader to use 
> for ResourceBundle lookup.
> 3) Loading the ResourceBundles can be expensive as it searches classloaders 
> and such.  Thus, moving that OUT of the synch block can help.  Create the 
> ResourceBundle, hold onto it strongly, and call getLogger and it can find it 
> using a very fast map lookup.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to