[ 
https://issues.apache.org/jira/browse/HIVE-23627?focusedWorklogId=441979&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441979
 ]

ASF GitHub Bot logged work on HIVE-23627:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jun/20 18:38
            Start Date: 05/Jun/20 18:38
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on pull request #1067:
URL: https://github.com/apache/hive/pull/1067#issuecomment-639696365


   And while on the topic, parameters also have an issue of Object 
instantiation.
   
   ```
   // Does not instantiate anything if DEBUG is disabled
   log.debug("{}::{}", "1", "2");
   
   // Does instantiate something if DEBUG is disabled
   log.debug("{}::{}:{}", "1", "2", "3");
   ```
   
   Why?  Because the API for SLF4J has a few versions of the `debug()` method:
   
   - debug(String)
   - debug(String, Object)
   - debug(String, Object, Object)
   - debug(String, Object...)
   
   So once you use anything more than two parameters, it has to create an 
`Object[]` to store the ellipsis values, whether debug logging is enabled or 
not.  In the case of debug logging not being enabled, it will create a 
`Object[]` every time and then quickly throw it away.  Not great in tight 
loops.  So, again, using parameters are not a panacea of performance.
   
   
https://github.com/qos-ch/slf4j/blob/0b97c416e42a184ff9728877b461c616187c58f7/slf4j-api/src/main/java/org/slf4j/Logger.java#L230


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 441979)
    Time Spent: 1h  (was: 50m)

> Review of GroupByOperator
> -------------------------
>
>                 Key: HIVE-23627
>                 URL: https://issues.apache.org/jira/browse/HIVE-23627
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to