You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "balloon72 (via GitHub)" <gi...@apache.org> on 2023/02/07 03:08:12 UTC

[GitHub] [shenyu] balloon72 opened a new issue, #4357: Output log optimization

balloon72 opened a new issue, #4357:
URL: https://github.com/apache/shenyu/issues/4357

   ### Description
   
   Passing message arguments that require further evaluation into a Guava com.google.common.base.Preconditions check can result in a performance penalty. That’s because whether or not they’re needed, each argument must be resolved before the method is actually called.
   Similarly, passing concatenated strings into a logging method can also incur a needless performance hit because the concatenation will be performed every time the method is called, whether or not the log level is low enough to show the message.
   Instead, you should structure your code to pass static or pre-computed values into Preconditions conditions check and logging calls.
   Specifically, the built-in string formatting should be used instead of string concatenation, and if the message is the result of a method call, then Preconditions should be skipped altogether, and the relevant exception should be conditionally thrown instead.
   
   ### Task List
   
   1.shenyu-admin


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

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

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


[GitHub] [shenyu] balloon72 closed issue #4357: Output log optimization

Posted by "balloon72 (via GitHub)" <gi...@apache.org>.
balloon72 closed issue #4357: Output log optimization
URL: https://github.com/apache/shenyu/issues/4357


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

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

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