[ https://issues.apache.org/jira/browse/CXF-3324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3324. ----------------------------------- Resolution: Fixed Assignee: Sergey Beryozkin http://svn.apache.org/viewvc?rev=1069500&view=rev thanks > JAXRSUtils: Avoid calling Message unless it'll be logged > -------------------------------------------------------- > > Key: CXF-3324 > URL: https://issues.apache.org/jira/browse/CXF-3324 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Affects Versions: 2.3.2 > Environment: JDK 1.6 > Reporter: Ka-Lok Fung > Assignee: Sergey Beryozkin > Priority: Minor > Labels: JAXRSUtils, log, performance > Fix For: 2.3.3 > > Attachments: CXF.Message.Hotspot.png > > Original Estimate: 1h > Remaining Estimate: 1h > > Our performance and reliability testing has shown that Message.toString() is > called many times in JAXRSUtils.selectResourceClass and > JAXRSUtils.findTargetMethod. It takes up 2.5% of our CPU when these messages > aren't even being logged. An image from the profiler showing this hotspot is > attached. > According to our tests, if you pre-check if the message is loggable (e.g., if > (LOG.isLoggable(Level.FINE))) and logging is set to the default level, the > throughput is increased by 2% and the CPU time is reduced by an equal amount. > The lines where this change would have the most impact are indicated in the > image. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira