user263688 user263688 - 2 years ago 154
Python Question

python `traceback` production performance

I'm using try catch blocks to handle exceptions in my Django app. However, I'm also using

module to print debug information in case an exception is caught.

# Exception gets thrown here

Should I remove this when moving into production? Does this have significant performance consequences (like xdebug in PHP, for instance)?

Answer Source

No, there are no significant performance implications to this; the traceback is already present with the exception when it is raised.

All traceback.print_exc() does is print the information already there.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download