[ 
https://issues.apache.org/jira/browse/DRILL-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652483#comment-14652483
 ] 

Jason Altekruse commented on DRILL-3496:
----------------------------------------

In /java/org/apache/drill/common/config/DrillConfig.java line 68:

-    logger.debug("Setting up config object.");
+    logger.debug("Setting up DrillConfig object.");
+    if (logger.isTraceEnabled()) {

[~jaltekruse] - I understand that this is to avoid the call the render() 
function if we don't need to log the statement, but isn't reading config file 
pretty rare to require this kind of optimization here? Did you notice a slow 
down on the drillbit startup time if we were always rendering the options, even 
if we were not logging them?
[~dsbos] - No, I didn't expect it to take any significant time; I just thought 
someone would object if the calls weren't guarded by that if statement.

So ... remove it to reduce the clutter, or keep/leave it?

[~jaltekruse] - Again I'm not particularly opinionated on this one. If we are 
trying to establish best practices, I would argue for leaving out the guard 
unless you are confident enough about the need for it that you would put in a 
comment describing the overhead you are avoiding. Otherwise we will have 
inconsistent patterns, and someone might find them and assume we always want 
the guards.
[~dsbos] - Removed isTraceEnabled guard.

> Augment logging in DrillConfig and classpath scanning.
> ------------------------------------------------------
>
>                 Key: DRILL-3496
>                 URL: https://issues.apache.org/jira/browse/DRILL-3496
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Jason Altekruse
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to