catch and rethrow is expensive, log is far far more expensive!

log will make a 5 times degradation in performance!

so if your call depth is 5, and you log at every layer, then that single failed call will take 5**5 more time to complete!

not to say the big mess made by all the repeated log record for the same single failure.

so in the end, log will kill you instead of save you. :-)

John Xie

SourceCompanion, the best in class collabration tool built on vss




Answer this question

catch and rethrow is expensive, log is far far more expensive!

  • Fuzzy6280

    i think i was replying in another thread.

    the original talk was about exception management.

    when I refer to log, i mean trace log.

    the cause of this overhead is due to the way tracelog is designed, the lock on concurrent access.



  • Phillip Feldman

    Where do you log in the event view

  • catch and rethrow is expensive, log is far far more expensive!