dcryans edited a comment on issue #8499:
URL: https://github.com/apache/skywalking/issues/8499#issuecomment-1028525147


   Hi @kezhenxu94,
   
   Usually, from what I know, try/except (or catch in java) will be less 
expensive when everything goes well and more expensive if it goes bad
   
   Since SkyWalking is adding headers to messages, I thought try except would 
be faster in most cases
   
   Here's an example of try vs if:
   
https://stackoverflow.com/questions/2522005/cost-of-exception-handlers-in-python
   
   Unless most people only instrument part of their stack? Then messages from 
uninstrumented apps would be more expensive.
   
   Let me know what you prefer, then I'll send the PR.


-- 
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-unsubscr...@skywalking.apache.org

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


Reply via email to