aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-08-07 18:16:31 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-08-07 18:17:00 (GMT)
commit86c45571271358d61aa1ab23746e9cd0565cf4cb (patch)
tree32036f26e41f0b8f293cad3f150f5e31d28fb593
parent2bcce0964b8010ab7c0b53c3afc058f843f8d581 (diff)
downloadfusearchive-86c45571271358d61aa1ab23746e9cd0565cf4cb.zip
fusearchive-86c45571271358d61aa1ab23746e9cd0565cf4cb.tar.gz
fusearchive-86c45571271358d61aa1ab23746e9cd0565cf4cb.tar.bz2
Kill the logging.debug function if we're not debugging, otherwise it shows
up in the top 3 functions in profiling, making it mostly nop speeds things up a bit
-rwxr-xr-xfusearchive.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fusearchive.py b/fusearchive.py
index 696c666..4df4116 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -44,6 +44,10 @@ def main():
# If debug is in the assembed opts then enable our debug too
if server.fuse_args.assemble()[ -1 ].find( 'debug' ) != -1:
log_level = logging.DEBUG
+ else:
+ # Null-out the logging.debug statement, otherwise it's a top-3 cpu
+ # eater in stat profiling
+ logging.debug = lambda x: 1
logging.basicConfig( level = log_level,
format = '%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(module)s:%(funcName)s() %(message)s',