You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/12/11 15:20:01 UTC

[GitHub] [hadoop] steveloughran commented on issue #1754: HADOOP-16751: DurationInfo text parsing/formatting should be moved out of hotpath

steveloughran commented on issue #1754: HADOOP-16751: DurationInfo text parsing/formatting should be moved out of hotpath
URL: https://github.com/apache/hadoop/pull/1754#issuecomment-564592805
 
 
   well spotted perf issue.
   
   The patch is doing lazy eval, but it now does it in: start, finish and toString calls, so at least 2x current overhed.
   
   better: just have a `String text` field which is set to the formatted result if the output is to be logged which is 
   
   ```
   (logAtInfo && log.isInfoEnabled() || log.isDebugEnabled()
   ```
   
   set that in the constructor and reference as needed,
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org