[ 
https://issues.apache.org/jira/browse/OWB-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868282#action_12868282
 ] 

James Carman commented on OWB-375:
----------------------------------

I agree that this could speed up performance, but are you seriously thinking 
this could be a bottleneck?  Between the dynamic proxies that are involved and 
the "web" aspect of OWB, I would think the string concatenations would be the 
least of your worries.

> Performance:  OWB logging performs operations when logging disabled.
> --------------------------------------------------------------------
>
>                 Key: OWB-375
>                 URL: https://issues.apache.org/jira/browse/OWB-375
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jacquelle Leggett
>            Assignee: Gurkan Erdogdu
>
> Logging operations in OWB code are not guarded by Logger.isLoggable(..) or 
> something similar and results in Strings being processed when logging is 
> disabled.
> Here's an example from AbstractInjectable:
>      logger.debug("Injected into bean : " + 
> this.injectionOwnerBean.toString() + " with injection point : " + 
> injectionPoint);
> The String concatenation above will occur whether or not logging is enabled.  
> WebBeansLogger should be modified so that the above can be changed to:
>      if(logger.isDebugEnabed())
>           logger.debug("Injected into bean : " + 
> this.injectionOwnerBean.toString() + " with injection point : " + 
> injectionPoint);
>      
> Generally speaking, it's best for logging statements to be guarded by an 
> isEnabled() flag to prevent performance impacts.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to