Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.2
-
JDK 1.6
-
Novice
Description
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.