[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719004#action_12719004
 ] 

Benjamin Reed edited comment on ZOOKEEPER-443 at 6/12/09 3:23 PM:
------------------------------------------------------------------

this looks good, but there something weird. ZooTrace also has an isTraceEnabled 
message. should we be using that? also 

{noformat}
-                ZooTrace.logRequest(LOG, traceMask, 'P', request, "");
+                if (LOG.isTraceEnabled()) {
+                    ZooTrace.logRequest(LOG, traceMask, 'P', request, "");
+                }
{noformat}

doesn't really need the if does it? nothing is processing is saved since no new 
strings are being built and the first thing ZooTrace.logRequest is going to do 
is call ZooTrace.isTraceEnabled.

      was (Author: breed):
    this looks good, but there something weird. ZooTrace also has an 
isTraceEnabled message. should we be using that? also 

{noformat}
-                ZooTrace.logRequest(LOG, traceMask, 'P', request, "");
+                if (LOG.isTraceEnabled()) {
+                    ZooTrace.logRequest(LOG, traceMask, 'P', request, "");
+                }
{noformat}

doesn't really need the if does it? nothing is saved and the first thing 
ZooTrace.logRequest is going to do is call ZooTrace.isTraceEnabled.
  
> trace logging in watch notification not wrapped with istraceneabled - 
> inefficient
> ---------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-443
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-443
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>            Priority: Critical
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-443.patch
>
>
> In org.apache.zookeeper.server.NIOServerCnxn.process(WatchedEvent) there's a 
> trace message
> that's not wrapped with isTraceEnabled, this is very inefficient and should 
> be fixed.

-- 
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